Merge pull request #25904 from weswigham/port-25838

Call toPath on sourceRoot to ensure it is always absolute (#25838)
This commit is contained in:
Mohamed Hegazy
2018-07-24 15:01:00 -07:00
committed by GitHub
2 changed files with 41 additions and 1 deletions

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[];