This commit is contained in:
Richard Harris
2019-02-24 20:56:16 -05:00
parent 4fe3c96c2d
commit eee9d21900

View File

@@ -93,9 +93,8 @@ prog.command('dev')
console.log(colors.bold().red(`${type}`));
if (error.loc) {
let file = error.loc.file && `${path.relative(process.cwd(), error.loc.file)} (${error.loc.line}:${error.loc.column})`;
if (file) console.log(colors.bold(file));
if (error.loc && error.loc.file) {
console.log(colors.bold(`${path.relative(process.cwd(), error.loc.file)} (${error.loc.line}:${error.loc.column})`));
}
console.log(colors.red(event.error.message));