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 662e70b72c
commit f5a7a269e4

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");