Call toPath on sourceRoot to ensure it is always absolute (#25838)

* Call toPath on sourceRoot to ensure it is always absolute

* Leave canonicalization to avoid a Path/string union
This commit is contained in:
Wesley Wigham authored and GitHub committed 2018-07-24 14:14:41 -07:00
1 parent 59854bbd55
commit 797d8bd07b
2 files changed
+41 -1

No files matched your search

+1 -1
View File
@@ -61,7 +61,7 @@ namespace ts.sourcemaps {
export function decode(host: SourceMapDecodeHost, mapPath: string, map: SourceMapData, program?: Program, fallbackCache = createSourceFileLikeCache(host)): SourceMapper {
const currentDirectory = getDirectoryPath(mapPath);
const sourceRoot = map.sourceRoot || currentDirectory;
const sourceRoot = map.sourceRoot ? getNormalizedAbsolutePath(map.sourceRoot, currentDirectory) : currentDirectory;
let decodedMappings: ProcessedSourceMapPosition[];
let generatedOrderedMappings: ProcessedSourceMapPosition[];
let sourceOrderedMappings: ProcessedSourceMapPosition[];