Skip to content

Commit 1b23d65

Browse files
authored
Merge pull request #60 from realmunk/patch-1
Remove unecessary TypeError on build
2 parents 2d426d7 + 5b35cc5 commit 1b23d65

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/cli.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,11 @@ function writeFile(f) {
3030
.then(content => {
3131
if (!argv.s) {
3232
console.log('Wrote ' + chalk.green(content.outputFilePath));
33-
content.messageList.forEach(message => {
34-
console.warn(chalk.yellow('[Warn] ' + message));
35-
});
33+
if (content.messageList && content.messageList.length) {
34+
content.messageList.forEach(message => {
35+
console.warn(chalk.yellow('[Warn] ' + message));
36+
});
37+
}
3638
}
3739
})
3840
.catch(reason => console.error(chalk.red('[Error] ' + reason)));

0 commit comments

Comments
 (0)