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 )