mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-13 01:21:58 +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());
|
||||
}
|
||||
|
||||
createSettingEntry(editor: IEditor, nodes: Node[]) {
|
||||
return new SettingTopEntry(editor, nodes);
|
||||
createSettingEntry(nodes: Node[]) {
|
||||
return new SettingTopEntry(this.editor, nodes);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -454,7 +454,15 @@ export class Designer {
|
||||
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) {
|
||||
|
||||
@ -138,7 +138,13 @@ export class SettingPropEntry implements SettingEntry {
|
||||
val = this.parent.getPropValue(this.name);
|
||||
}
|
||||
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;
|
||||
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;
|
||||
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