wrap in try catch

This commit is contained in:
Mutasem 2021-11-30 17:45:20 +01:00
parent 462ea0a4ae
commit 4b0444747f

View file

@ -2021,8 +2021,14 @@ export default mixins(
deleteEveryEndpoint () { deleteEveryEndpoint () {
if (this.instance) { if (this.instance) {
const nodes = this.$store.getters.allNodes as INodeUi[]; const nodes = this.$store.getters.allNodes as INodeUi[];
nodes.forEach((node: INodeUi) => {
try {
// @ts-ignore // @ts-ignore
nodes.forEach((node: INodeUi) => this.instance.destroyDraggable(`${NODE_NAME_PREFIX}${this.$store.getters.getNodeIndex(node.name)}`)); 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 // On first load it does not exist
this.instance.deleteEveryEndpoint(); this.instance.deleteEveryEndpoint();