Commit 77fe779f authored by Jacob Schatz's avatar Jacob Schatz

Remove Event listener and make code more readable.

parent 89c3c88e
......@@ -153,10 +153,13 @@
return !!this.state.updatedAt;
},
issueChanged() {
return this.initialDescriptionText
!== this.store.formState.description
|| this.initialTitleText
!== this.store.formState.title;
let descriptionChanged =
this.initialDescriptionText !== this.store.formState.description;
let titleChanged =
this.initialTitleText !== this.store.formState.title;
return descriptionChanged || titleChanged;
},
},
created() {
......@@ -194,6 +197,7 @@
eventHub.$off('update.issuable', this.updateIssuable);
eventHub.$off('close.form', this.closeForm);
eventHub.$off('open.form', this.openForm);
window.removeEventListener('beforeunload', this.handleBeforeUnloadEvent);
},
methods: {
handleBeforeUnloadEvent(e) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment