mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-03-06 02:11:56 +00:00
catch error avoid white paper
This commit is contained in:
parent
c1acc2b26b
commit
f51bd34737
@ -266,8 +266,8 @@ export class Designer {
|
|||||||
this.oobxList.forEach((item) => item.compute());
|
this.oobxList.forEach((item) => item.compute());
|
||||||
}
|
}
|
||||||
|
|
||||||
createSettingEntry(editor: IEditor, nodes: Node[]) {
|
createSettingEntry(nodes: Node[]) {
|
||||||
return new SettingTopEntry(editor, nodes);
|
return new SettingTopEntry(this.editor, nodes);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -454,7 +454,15 @@ export class Designer {
|
|||||||
return props;
|
return props;
|
||||||
}
|
}
|
||||||
|
|
||||||
return reducers.reduce((xprops, reducer) => reducer(xprops, node), props);
|
return reducers.reduce((xprops, reducer) => {
|
||||||
|
try {
|
||||||
|
return reducer(xprops, node)
|
||||||
|
} catch (e) {
|
||||||
|
// todo: add log
|
||||||
|
console.warn(e);
|
||||||
|
return xprops;
|
||||||
|
}
|
||||||
|
}, props);
|
||||||
}
|
}
|
||||||
|
|
||||||
addPropsReducer(reducer: PropsReducer, stage: TransformStage) {
|
addPropsReducer(reducer: PropsReducer, stage: TransformStage) {
|
||||||
|
|||||||
@ -138,7 +138,13 @@ export class SettingPropEntry implements SettingEntry {
|
|||||||
val = this.parent.getPropValue(this.name);
|
val = this.parent.getPropValue(this.name);
|
||||||
}
|
}
|
||||||
const { getValue } = this.extraProps;
|
const { getValue } = this.extraProps;
|
||||||
return getValue ? getValue(this, val) : val;
|
try {
|
||||||
|
return getValue ? getValue(this, val) : val;
|
||||||
|
} catch (e) {
|
||||||
|
// todo: add log
|
||||||
|
console.warn(e);
|
||||||
|
return val;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -153,7 +159,12 @@ export class SettingPropEntry implements SettingEntry {
|
|||||||
}
|
}
|
||||||
const { setValue } = this.extraProps;
|
const { setValue } = this.extraProps;
|
||||||
if (setValue && !extraOptions.disableMutator) {
|
if (setValue && !extraOptions.disableMutator) {
|
||||||
setValue(this, val);
|
try {
|
||||||
|
setValue(this, val);
|
||||||
|
} catch (e) {
|
||||||
|
// todo: add log
|
||||||
|
console.warn(e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -166,7 +177,12 @@ export class SettingPropEntry implements SettingEntry {
|
|||||||
}
|
}
|
||||||
const { setValue } = this.extraProps;
|
const { setValue } = this.extraProps;
|
||||||
if (setValue) {
|
if (setValue) {
|
||||||
setValue(this, undefined);
|
try {
|
||||||
|
setValue(this, undefined);
|
||||||
|
} catch (e) {
|
||||||
|
// todo: add log
|
||||||
|
console.warn(e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user