added missing check if file is specified

This commit is contained in:
Vladimir Matveev 2015-11-11 16:51:29 -08:00
parent f8489afe7f
commit 4720c3592d

View File

@ -2847,8 +2847,11 @@ namespace ts {
}
function sourceFileUpToDate(sourceFile: SourceFile): boolean {
if (!sourceFile) {
return false;
}
let path = sourceFile.path || toPath(sourceFile.fileName, currentDirectory, getCanonicalFileName);
return sourceFile && sourceFile.version === hostCache.getVersion(path);
return sourceFile.version === hostCache.getVersion(path);
}
function programUpToDate(): boolean {