GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Merge branch 'feat/0228' of github.com:alibaba/lowcode-engine into fe… · huihao/lowcode-engine@3ddc8f1

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • modules/code-generator/src
    • generator
      • ProjectBuilder.ts
    • utils
      • jsExpression.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎modules/code-generator/src/generator/ProjectBuilder.ts‎

Copy file name to clipboardExpand all lines: modules/code-generator/src/generator/ProjectBuilder.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ export class ProjectBuilder implements IProjectBuilder {
320320
// template: this.template,
321321
inStrictMode: this.inStrictMode,
322322
tolerateEvalErrors: true,
323-
evalErrorsHandler: '',
323+
evalErrorsHandler: 'console.error(error)',
324324
...this.extraContextData,
325325
...extraContextData,
326326
},
Collapse file

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

Copy file name to clipboardExpand all lines: modules/code-generator/src/utils/jsExpression.ts
+7-2Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,12 @@ function getBodyStatements(content: string) {
7979
throw new Error('Can not find Function Statement');
8080
}
8181

82-
export function isJsCode(value: unknown): boolean {
82+
/**
83+
* 是否是广义上的 JSFunction
84+
* @param value
85+
* @returns
86+
*/
87+
export function isBroadJSFunction(value: unknown): boolean {
8388
return isJSExpressionFn(value) || isJSFunction(value);
8489
}
8590

@@ -117,7 +122,7 @@ export function generateFunction(
117122
isBindExpr: false,
118123
},
119124
) {
120-
if (isJsCode(value)) {
125+
if (isBroadJSFunction(value)) {
121126
const functionCfg = value as IPublicTypeJSFunction;
122127
const functionSource = getFunctionSource(functionCfg);
123128
if (config.isMember) {

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.