refactor(editor): highlight error when jstoolkit objects are not deleted (#4451)

* remove try/catch

* update try catch
This commit is contained in:
Mutasem Aldmour
2022-10-27 09:39:39 +02:00
committed by GitHub
parent d1b4d428cb
commit 839f6ac777

View File

@@ -2752,13 +2752,18 @@ export default mixins(
deleteEveryEndpoint() { deleteEveryEndpoint() {
// Check as it does not exist on first load // Check as it does not exist on first load
if (this.instance) { if (this.instance) {
try { const nodes = this.$store.getters.allNodes as INodeUi[];
const nodes = this.$store.getters.allNodes as INodeUi[]; nodes.forEach((node: INodeUi) => {
// @ts-ignore try {
nodes.forEach((node: INodeUi) => this.instance.destroyDraggable(node.id)); // important to prevent memory leak
// @ts-ignore
this.instance.destroyDraggable(node.id);
} catch (e) {
console.error(e);
}
});
this.instance.deleteEveryEndpoint(); this.instance.deleteEveryEndpoint();
} catch (e) { }
} }
}, },
matchCredentials(node: INodeUi) { matchCredentials(node: INodeUi) {