Skip to content
This repository was archived by the owner on Dec 1, 2019. It is now read-only.

Commit 399167f

Browse files
committed
fix: proper check for fileName
1 parent 97ebe79 commit 399167f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/checker/runtime.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ function createChecker(receive: (cb: (msg: Req) => void) => void, send: (msg: Re
410410
const message = compiler.flattenDiagnosticMessageText(diagnostic.messageText, '\n');
411411
let fileName = diagnostic.file && path.relative(context, diagnostic.file.fileName);
412412

413-
if (fileName[0] !== '.') {
413+
if (fileName && fileName[0] !== '.') {
414414
fileName = './' + toUnix(fileName);
415415
}
416416

0 commit comments

Comments
 (0)