mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-03-05 17:57:13 +00:00
fix: 兼容没有 prototype 的情况
This commit is contained in:
parent
57ae82453a
commit
e442436440
@ -79,7 +79,7 @@ editor?.on('history.forward', (data) => {
|
|||||||
|
|
||||||
function triggerUseVariableChange(data: any) {
|
function triggerUseVariableChange(data: any) {
|
||||||
const { node, prop, oldValue, newValue } = data;
|
const { node, prop, oldValue, newValue } = data;
|
||||||
const propConfig = node.componentMeta.prototype.options.configure.find((o: any) => o.name === prop.getKey());
|
const propConfig = node.componentMeta.prototype?.options.configure.find((o: any) => o.name === prop.getKey());
|
||||||
if (!propConfig?.useVariableChange) return;
|
if (!propConfig?.useVariableChange) return;
|
||||||
if (isJSExpression(oldValue) && !isJSExpression(newValue)) {
|
if (isJSExpression(oldValue) && !isJSExpression(newValue)) {
|
||||||
propConfig.useVariableChange.call(prop, { isUseVariable: false });
|
propConfig.useVariableChange.call(prop, { isUseVariable: false });
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user