From ac8dec3f1454bb3d4d17c6d4f2c63f8cb3defef4 Mon Sep 17 00:00:00 2001 From: zhangbingce Date: Thu, 18 Aug 2022 21:24:06 +0800 Subject: [PATCH] bugfix of compile error in esmodule mode Signed-off-by: zhangbingce Change-Id: If03fae04a36eabdc8cefb341b051d598d3b4bdac --- compiler/src/validate_ui_syntax.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/compiler/src/validate_ui_syntax.ts b/compiler/src/validate_ui_syntax.ts index 6229fc5..9701ce4 100644 --- a/compiler/src/validate_ui_syntax.ts +++ b/compiler/src/validate_ui_syntax.ts @@ -1042,6 +1042,9 @@ export function processSystemApi(content: string, isProcessAllowList: boolean = } function collectSourcemapNames(sourcePath: string, changedName: string, originalName: string): void { + if (sourcePath == null) { + return; + } const cleanSourcePath: string = sourcePath.replace('.ets', '.js').replace('.ts', '.js'); if (!sourcemapNamesCollection.has(cleanSourcePath)) { return;