Skip to content

Commit 2ac377c

Browse files
committed
Fixed the file map lookup to use hasOwnProperty
1 parent 412ef61 commit 2ac377c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/harness/harness.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ module Harness {
539539
getCurrentDirectory: sys.getCurrentDirectory,
540540
getCancellationToken: (): any => undefined,
541541
getSourceFile: (fn, languageVersion) => {
542-
if (ts.getCanonicalFileName(fn) in filemap) {
542+
if (Object.prototype.hasOwnProperty.call(filemap, ts.getCanonicalFileName(fn))) {
543543
return filemap[ts.getCanonicalFileName(fn)];
544544
} else {
545545
var lib = defaultLibFileName;

0 commit comments

Comments
 (0)