From 63281ad28e22bfcc462e8a0f5008ff2ff550465b Mon Sep 17 00:00:00 2001 From: ahsan-virani Date: Fri, 12 Mar 2021 11:56:37 +0100 Subject: [PATCH] cleanup --- packages/editor-ui/src/views/NodeView.vue | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/packages/editor-ui/src/views/NodeView.vue b/packages/editor-ui/src/views/NodeView.vue index e8e5968095..7ff917d0c1 100644 --- a/packages/editor-ui/src/views/NodeView.vue +++ b/packages/editor-ui/src/views/NodeView.vue @@ -358,18 +358,6 @@ export default mixins( async openWorkflow (data: IWorkflowDb, dirty = false) { this.resetWorkspace(); - // let data: IWorkflowDb | undefined; - // try { - // data = await this.restApi().getWorkflow(workflowId); - // } catch (error) { - // this.$showError(error, 'Problem opening workflow', 'There was a problem opening the workflow:'); - // return; - // } - - // if (!data || data === undefined) { - // throw new Error(`Workflow with id "${data.id}" could not be found!`); - // } - this.$store.commit('setActive', data.active || false); this.$store.commit('setWorkflowId', data.id); this.$store.commit('setWorkflowName', {newName: data.name, setStateDirty: dirty}); @@ -1446,7 +1434,6 @@ export default mixins( this.$titleSet(workflow.name, 'IDLE'); - // compare local storage and db wfs const localStorageWorkflow = this.$store.getters.getWorkflowFromLocalStorage(workflowId); if(localStorageWorkflow && !result) { @@ -1478,10 +1465,6 @@ export default mixins( document.addEventListener('keydown', this.keyDown); document.addEventListener('keyup', this.keyUp); - window.addEventListener("unload", (e) => { - this.$store.commit('setStateDirty', false); - }); - window.addEventListener("beforeunload", (e) => { if(this.$store.getters.getStateIsDirty === true) { const confirmationMessage = 'It looks like you have been editing something. '