From df8a7507467e8ceef1d9fa8db437dd202239c6ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?LeoYuan=20=E8=A2=81=E5=8A=9B=E7=9A=93?= Date: Wed, 8 Feb 2023 19:50:51 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=85=BC=E5=AE=B9=E6=9F=90=E4=BA=9B?= =?UTF-8?q?=E8=80=81=E7=9A=84=E9=80=9A=E8=BF=87=20JSE=20=E6=9D=A5=E8=A1=A8?= =?UTF-8?q?=E8=BE=BE=E5=87=BD=E6=95=B0=E7=9A=84=E5=9C=BA=E6=99=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/code-generator/src/utils/jsExpression.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/code-generator/src/utils/jsExpression.ts b/modules/code-generator/src/utils/jsExpression.ts index 40099b1e2..25c7f47fd 100644 --- a/modules/code-generator/src/utils/jsExpression.ts +++ b/modules/code-generator/src/utils/jsExpression.ts @@ -135,5 +135,9 @@ export function generateFunction( return functionSource; } + if (isJSExpression(value)) { + return value.value; + } + throw new CodeGeneratorError('Not a JSFunction or JSExpression'); }