File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ var annotations_exporter = function (pl) {
17
17
var oldAnnotations = fs . readFileSync ( path . resolve ( paths . source . annotations , 'annotations.js' ) , 'utf8' ) ;
18
18
} catch ( ex ) {
19
19
console . log ( 'annotations.js file missing from ' + paths . source . annotations + '. This may be expected.' ) ;
20
+ return [ ] ;
20
21
}
21
22
22
23
//parse as JSON by removing the old wrapping js syntax. comments and the trailing semi-colon
@@ -26,6 +27,7 @@ var annotations_exporter = function (pl) {
26
27
} catch ( ex ) {
27
28
console . log ( 'There was an error parsing JSON for ' + paths . source . annotations + 'annotations.js' ) ;
28
29
console . log ( ex ) ;
30
+ return [ ] ;
29
31
}
30
32
return oldAnnotationsJSON . comments ;
31
33
}
@@ -42,6 +44,7 @@ var annotations_exporter = function (pl) {
42
44
annotationsMD = fs . readFileSync ( path . resolve ( paths . source . annotations , 'annotations.md' ) , 'utf8' ) ;
43
45
} catch ( ex ) {
44
46
console . log ( 'annotations.md file missing from ' + paths . source . annotations + '. This may be expected.' ) ;
47
+ return [ ] ;
45
48
}
46
49
47
50
//take the annotation snippets and split them on our custom delimiter
You can’t perform that action at this time.
0 commit comments