build(aio): fix empty docplaster processing

This commit is contained in:
Peter Bacon Darwin
2017-04-01 00:07:14 +01:00
committed by Alex Rickabaugh
parent 5fbb0d050c
commit 3e793f079d
2 changed files with 15 additions and 2 deletions

View File

@ -56,7 +56,9 @@ function regionParserImpl(contents, fileType) {
`Tried to open a region, named "${regionName}", that is already open`, index);
}
region.open = true;
region.lines.push(plaster);
if (plaster) {
region.lines.push(plaster);
}
} else {
regionMap[regionName] = {lines: [], open: true};
}
@ -86,7 +88,8 @@ function regionParserImpl(contents, fileType) {
// doc plaster processing
} else if (updatePlaster) {
plaster = regionMatcher.createPlasterComment(updatePlaster[1].trim());
const plasterString = updatePlaster[1].trim();
plaster = plasterString ? regionMatcher.createPlasterComment(plasterString) : '';
// simple line of content processing
} else {