Fixed the file map lookup to use hasOwnProperty

This commit is contained in:
Sheetal Nandi 2014-08-21 13:03:08 -07:00
parent 412ef61cd8
commit 2ac377cc76

View File

@ -539,7 +539,7 @@ module Harness {
getCurrentDirectory: sys.getCurrentDirectory,
getCancellationToken: (): any => undefined,
getSourceFile: (fn, languageVersion) => {
if (ts.getCanonicalFileName(fn) in filemap) {
if (Object.prototype.hasOwnProperty.call(filemap, ts.getCanonicalFileName(fn))) {
return filemap[ts.getCanonicalFileName(fn)];
} else {
var lib = defaultLibFileName;