From 4aa91c034ee63f1da11dcef9a590cd6f84e4b323 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C5=BEe=20Fortun?= Date: Tue, 7 Nov 2023 15:10:12 +0100 Subject: [PATCH] Fix connection undefined when creating new modal --- client/web/compose/src/views/Admin/Modules/Edit.vue | 5 +++-- client/web/compose/src/views/Admin/Modules/Records/View.vue | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/client/web/compose/src/views/Admin/Modules/Edit.vue b/client/web/compose/src/views/Admin/Modules/Edit.vue index 62824ca49..3cadf6785 100644 --- a/client/web/compose/src/views/Admin/Modules/Edit.vue +++ b/client/web/compose/src/views/Admin/Modules/Edit.vue @@ -154,7 +154,7 @@ { // Make a copy so that we do not change store item by ref this.module = module.clone() - this.initialModuleState = module.clone() const { moduleID, namespaceID, issues = [] } = this.module if (issues.length > 0) { @@ -877,6 +876,8 @@ export default { .then(({ set }) => { this.hasRecords = (set.length > 0) }) }) } + + this.initialModuleState = this.module.clone() }, checkAlterations () { 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 83f511dbb..9b8da5ed6 100644 --- a/client/web/compose/src/views/Admin/Modules/Records/View.vue +++ b/client/web/compose/src/views/Admin/Modules/Records/View.vue @@ -340,7 +340,7 @@ export default { checkUnsavedChanges (next, to) { if (this.isNew) { - return next() + next(true) } else { const recordValues = JSON.parse(JSON.stringify(this.record.values)) const initialRecordState = JSON.parse(JSON.stringify(this.initialRecordState.values))