Merge pull request #29555 from petebacondarwin/external-skip-trivia-fix

Use the correct source when skipping trivia
This commit is contained in:
Sheetal Nandi
2019-01-24 12:09:10 -08:00
committed by GitHub
3 changed files with 37 additions and 2 deletions
+2 -2
View File
@@ -4372,10 +4372,10 @@ namespace ts {
}
/**
* Skips trivia such as comments and white-space that can optionally overriden by the source map source
* Skips trivia such as comments and white-space that can be optionally overridden by the source-map source
*/
function skipSourceTrivia(source: SourceMapSource, pos: number): number {
return source.skipTrivia ? source.skipTrivia(pos) : skipTrivia(sourceMapSource.text, pos);
return source.skipTrivia ? source.skipTrivia(pos) : skipTrivia(source.text, pos);
}
/**