fix: sourceMap sometime error

Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
MiaoWoo 2020-03-24 15:02:20 +08:00
parent 9b69b1221b
commit aee0457d9f

View File

@ -103,7 +103,7 @@ export class MiaoScriptConsole implements Console {
}
}
if (this.sourceMaps[fileName]) {
var sourceMapping = this.sourceMaps[fileName].getSource(lineNumber, lineNumber);
var sourceMapping = this.sourceMaps[fileName].getSource(lineNumber, 25, true);
if (sourceMapping) {
if (lineNumber != sourceMapping.mapping.sourceLine) {
fileName = fileName.replace(".js", ".ts");