From 84b9ebd0d7c40b9987f2ee8c7b821ac550eb5b2a Mon Sep 17 00:00:00 2001 From: Kanchalai Tanglertsampan Date: Wed, 22 Feb 2017 15:42:22 -0800 Subject: [PATCH] Return empty string instead to prevent exception downstream particularly in writeReferencePath --- src/compiler/utilities.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 66bf693d831d6..528544e46d09d 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -2653,7 +2653,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); } }