解决偶现删除backgroundColor属性时,异常报错

Signed-off-by: bojiang <jiangbo91@huawei.com>
Change-Id: Iad9a3fe566d0483dcfc270a720266cea0999a922
This commit is contained in:
bojiang
2022-09-07 18:18:57 +08:00
parent ec01d1e792
commit c340ae1fdc
+1 -1
View File
@@ -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) {