Merge pull request #14252 from Microsoft/master-fix12297

[Master] Fix 12297 undefined exception in writeReferencePath
This commit is contained in:
Yui 2017-03-20 21:00:34 -07:00 committed by GitHub
commit b6dfa39ce0

View file

@ -2675,7 +2675,7 @@ namespace ts {
if (sourceFiles.length) {
const jsFilePath = options.outFile || options.out;
const sourceMapFilePath = getSourceMapFilePath(jsFilePath, options);
const declarationFilePath = options.declaration ? removeFileExtension(jsFilePath) + ".d.ts" : undefined;
const declarationFilePath = options.declaration ? removeFileExtension(jsFilePath) + ".d.ts" : "";
action({ jsFilePath, sourceMapFilePath, declarationFilePath }, createBundle(sourceFiles), emitOnlyDtsFiles);
}
}