From f5a7a269e437c168f7de3bbf93946026ce785a71 Mon Sep 17 00:00:00 2001 From: MiaoWoo Date: Tue, 24 Mar 2020 15:02:20 +0800 Subject: [PATCH] fix: sourceMap sometime error Signed-off-by: MiaoWoo --- packages/api/src/console.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/api/src/console.ts b/packages/api/src/console.ts index f4b07274..3e1e8648 100644 --- a/packages/api/src/console.ts +++ b/packages/api/src/console.ts @@ -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");