diff --git a/client/web/compose/src/components/PageBlocks/AutomationBase.vue b/client/web/compose/src/components/PageBlocks/AutomationBase.vue index 1f5723d62..0bc96537b 100644 --- a/client/web/compose/src/components/PageBlocks/AutomationBase.vue +++ b/client/web/compose/src/components/PageBlocks/AutomationBase.vue @@ -52,6 +52,8 @@ export default { }, beforeDestroy () { + this.setDefaultValues() + this.abortRequests.forEach((cancel) => { cancel() }) @@ -82,13 +84,7 @@ export default { this.processing = false }) }, - }, - beforeDestroy () { - this.setDefaultValues() - }, - - methods: { setDefaultValues () { this.processing = false this.automationScripts = [] diff --git a/client/web/compose/src/views/Admin/Modules/Edit.vue b/client/web/compose/src/views/Admin/Modules/Edit.vue index aaa72ae3b..b170454a4 100644 --- a/client/web/compose/src/views/Admin/Modules/Edit.vue +++ b/client/web/compose/src/views/Admin/Modules/Edit.vue @@ -706,6 +706,9 @@ export default { beforeDestroy () { this.setDefaultValues() + this.abortRequests.forEach((cancel) => { + cancel() + }) }, beforeRouteUpdate (to, from, next) { @@ -716,12 +719,6 @@ export default { this.checkUnsavedModule(next) }, - beforeDestroy () { - this.abortRequests.forEach((cancel) => { - cancel() - }) - }, - methods: { ...mapActions({ findModuleByID: 'module/findByID', diff --git a/client/web/compose/src/views/Admin/Modules/Records/View.vue b/client/web/compose/src/views/Admin/Modules/Records/View.vue index b4f06ef01..87e96ff6a 100644 --- a/client/web/compose/src/views/Admin/Modules/Records/View.vue +++ b/client/web/compose/src/views/Admin/Modules/Records/View.vue @@ -231,6 +231,8 @@ export default { }, beforeDestroy () { + this.setDefaultValues() + this.abortRequests.forEach((cancel) => { cancel() }) @@ -241,10 +243,6 @@ export default { this.record = new compose.Record(this.module, { values: this.values }) }, - beforeDestroy () { - this.setDefaultValues() - }, - methods: { createBlocks () { this.fields.forEach(f => { diff --git a/client/web/compose/src/views/Admin/Pages/Edit.vue b/client/web/compose/src/views/Admin/Pages/Edit.vue index 69842eedd..5424b3cbc 100644 --- a/client/web/compose/src/views/Admin/Pages/Edit.vue +++ b/client/web/compose/src/views/Admin/Pages/Edit.vue @@ -1063,6 +1063,8 @@ export default { }, beforeDestroy () { + this.setDefaultValues() + this.abortRequests.forEach((cancel) => { cancel() }) @@ -1072,10 +1074,6 @@ export default { this.fetchRoles() }, - beforeDestroy () { - this.setDefaultValues() - }, - methods: { ...mapActions({ findPageByID: 'page/findByID',