mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
refactor(editor): highlight error when jstoolkit objects are not deleted (#4451)
* remove try/catch * update try catch
This commit is contained in:
@@ -2752,13 +2752,18 @@ export default mixins(
|
||||
deleteEveryEndpoint() {
|
||||
// Check as it does not exist on first load
|
||||
if (this.instance) {
|
||||
try {
|
||||
const nodes = this.$store.getters.allNodes as INodeUi[];
|
||||
// @ts-ignore
|
||||
nodes.forEach((node: INodeUi) => this.instance.destroyDraggable(node.id));
|
||||
const nodes = this.$store.getters.allNodes as INodeUi[];
|
||||
nodes.forEach((node: INodeUi) => {
|
||||
try {
|
||||
// important to prevent memory leak
|
||||
// @ts-ignore
|
||||
this.instance.destroyDraggable(node.id);
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
});
|
||||
|
||||
this.instance.deleteEveryEndpoint();
|
||||
} catch (e) { }
|
||||
this.instance.deleteEveryEndpoint();
|
||||
}
|
||||
},
|
||||
matchCredentials(node: INodeUi) {
|
||||
|
||||
Reference in New Issue
Block a user