From c340ae1fdc2699c70903af4811d130cad65807f1 Mon Sep 17 00:00:00 2001 From: bojiang Date: Wed, 7 Sep 2022 18:18:57 +0800 Subject: [PATCH] jiangbo91@huawei.com MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 解决偶现删除backgroundColor属性时,异常报错 Signed-off-by: bojiang Change-Id: Iad9a3fe566d0483dcfc270a720266cea0999a922 --- compiler/src/process_component_build.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/src/process_component_build.ts b/compiler/src/process_component_build.ts index b34ad36..ca91299 100644 --- a/compiler/src/process_component_build.ts +++ b/compiler/src/process_component_build.ts @@ -338,7 +338,7 @@ function processInnerComponent(node: ts.ExpressionStatement, newStatements: ts.S let curFileName: string; let line: number = 1; let col: number = 1; - if (newsupplement.isAcceleratePreview) { + if (sourceNode && newsupplement.isAcceleratePreview) { posOfNode = sourceNode.getLineAndCharacterOfPosition(getRealNodePos(node)); curFileName = newsupplement.fileName; if (posOfNode.line === 0) {