From 4b0444747f7c2f724c18f7bab6b769fba1727f07 Mon Sep 17 00:00:00 2001 From: Mutasem Date: Tue, 30 Nov 2021 17:45:20 +0100 Subject: [PATCH] wrap in try catch --- packages/editor-ui/src/views/NodeView.vue | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/editor-ui/src/views/NodeView.vue b/packages/editor-ui/src/views/NodeView.vue index 1f1c591c0f..7f81972c18 100644 --- a/packages/editor-ui/src/views/NodeView.vue +++ b/packages/editor-ui/src/views/NodeView.vue @@ -2021,8 +2021,14 @@ export default mixins( deleteEveryEndpoint () { if (this.instance) { const nodes = this.$store.getters.allNodes as INodeUi[]; - // @ts-ignore - nodes.forEach((node: INodeUi) => this.instance.destroyDraggable(`${NODE_NAME_PREFIX}${this.$store.getters.getNodeIndex(node.name)}`)); + nodes.forEach((node: INodeUi) => { + try { + // @ts-ignore + this.instance.destroyDraggable(`${NODE_NAME_PREFIX}${this.$store.getters.getNodeIndex(node.name)}`); // eslint-disable-line no-console + } catch (e) { + console.error(e); + } + }); // On first load it does not exist this.instance.deleteEveryEndpoint();