mirror of
https://github.com/openharmony/developtools_ace-ets2bundle.git
synced 2026-07-21 03:55:23 -04:00
Fix previewer bug when has no entry component
related issue: https://gitee.com/openharmony/developtools_ace-ets2bundle/issues/I5J8OK Signed-off-by: Zhenyu Pan <panzhenyu1@huawei.com>
This commit is contained in:
@@ -484,9 +484,10 @@ function createEntryNode(node: ts.SourceFile, context: ts.TransformationContext)
|
||||
return node;
|
||||
}
|
||||
} else {
|
||||
const entryNode: ts.ExpressionStatement =
|
||||
createEntryFunction(componentCollection.entryComponent, context);
|
||||
return context.factory.updateSourceFile(node, [...node.statements, entryNode]);
|
||||
const entryNode: ts.ExpressionStatement =
|
||||
createEntryFunction(componentCollection.entryComponent ||
|
||||
Array.from(componentCollection.previewComponent)[0], context);
|
||||
return context.factory.updateSourceFile(node, [...node.statements, entryNode]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user