From eee9d21900b5f796503e0fe12ca46df3f8246b36 Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Sun, 24 Feb 2019 20:56:16 -0500 Subject: [PATCH] tidy up --- src/cli.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/cli.ts b/src/cli.ts index c8687a3..5ebacc9 100755 --- a/src/cli.ts +++ b/src/cli.ts @@ -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));