Skip to content

Commit df8a750

Browse files
committed
fix: 兼容某些老的通过 JSE 来表达函数的场景
1 parent 62289e5 commit df8a750

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

modules/code-generator/src/utils/jsExpression.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,5 +135,9 @@ export function generateFunction(
135135
return functionSource;
136136
}
137137

138+
if (isJSExpression(value)) {
139+
return value.value;
140+
}
141+
138142
throw new CodeGeneratorError('Not a JSFunction or JSExpression');
139143
}

0 commit comments

Comments
 (0)