From 83d3eb699195dc507c1358bbd2cab5969d8ec5a2 Mon Sep 17 00:00:00 2001 From: Forms Dev Date: Tue, 28 Nov 2023 15:52:05 +0530 Subject: [PATCH] small fixes --- resources/js/components/open/forms/OpenCompleteForm.vue | 2 +- resources/js/pages/forms/edit.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/js/components/open/forms/OpenCompleteForm.vue b/resources/js/components/open/forms/OpenCompleteForm.vue index fb06d42..ee0d9e9 100644 --- a/resources/js/components/open/forms/OpenCompleteForm.vue +++ b/resources/js/components/open/forms/OpenCompleteForm.vue @@ -219,7 +219,7 @@ export default { this.playConfetti() } }).catch((error) => { - if (error.response.data && error.response.data.message) { + if (error.response && error.response.data && error.response.data.message) { this.alertError(error.response.data.message) } this.loading = false diff --git a/resources/js/pages/forms/edit.vue b/resources/js/pages/forms/edit.vue index c88f461..6e8cb61 100644 --- a/resources/js/pages/forms/edit.vue +++ b/resources/js/pages/forms/edit.vue @@ -109,7 +109,7 @@ export default { this.formInitialHash = this.hashString(JSON.stringify(this.updatedForm.data())) } - if (!this.updatedForm.notification_settings || Array.isArray(this.updatedForm.notification_settings)) { + if (this.updatedForm && (!this.updatedForm.notification_settings || Array.isArray(this.updatedForm.notification_settings))) { this.updatedForm.notification_settings = {} } },