From 65d0735ab65873445128f8dd28125868589ec53e Mon Sep 17 00:00:00 2001 From: houhaoyu Date: Wed, 6 Jul 2022 18:30:53 +0800 Subject: [PATCH] houhaoyu@huawei.com remove loadDocument in preview Signed-off-by: houhaoyu Change-Id: I32df717f139cad739c420fda8a6ff72748a098f8 --- compiler/src/process_ui_syntax.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/src/process_ui_syntax.ts b/compiler/src/process_ui_syntax.ts index 2716c3c..4be191b 100644 --- a/compiler/src/process_ui_syntax.ts +++ b/compiler/src/process_ui_syntax.ts @@ -599,7 +599,7 @@ function createPreviewComponentFunction(name: string, context: ts.Transformation ...argsArr ] )), - context.factory.createExpressionStatement(context.factory.createCallExpression( + name ? context.factory.createExpressionStatement(context.factory.createCallExpression( context.factory.createIdentifier(PAGE_ENTRY_FUNCTION_NAME), undefined, [context.factory.createNewExpression( @@ -607,7 +607,7 @@ function createPreviewComponentFunction(name: string, context: ts.Transformation undefined, newArray )] - )) + )) : undefined ], true )