alibaba / alibaba/lowcode-engine

this.xxxFunc.apply调用时,希望加上存在判断

Open
#2,567 0 comments 0 reactions 1 assignee Claimed by @hzd822 View on GitHub
Dominant language
TypeScript
Stars
15.9k
Forks
2.7k
PR merge metrics
No merged PRs in 30d

Description

FunctionSetter绑定函数时,在点击绑定函数一直到源码面板生成函数并保存的过程中,这段时间xxxFunc是undefined,直接调用
```
ƒ (){ return this.xxxFunc.apply(this,Array.prototype.slice.call(arguments).concat([])) }
```
会导致报错
```
异常原因: Cannot read properties of undefined (reading 'apply')%s
```
一直到函数编辑完之后才会恢复正常,在某些情况下组件会出现短暂崩溃,希望这段话能先判断一下函数存不存在,兼容函数不存在时的情况

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.