diff --git a/resources/js/components/open/forms/components/form-components/components/FormNotificationsDiscord.vue b/resources/js/components/open/forms/components/form-components/components/FormNotificationsDiscord.vue index 3ebca14..ddb28f2 100644 --- a/resources/js/components/open/forms/components/form-components/components/FormNotificationsDiscord.vue +++ b/resources/js/components/open/forms/components/form-components/components/FormNotificationsDiscord.vue @@ -73,6 +73,9 @@ export default { watch: {}, mounted () { + if(!this.form.notification_settings.discord){ + this.form.notification_settings.discord = {} + } }, methods: {} diff --git a/resources/js/components/open/forms/components/form-components/components/FormNotificationsMessageActions.vue b/resources/js/components/open/forms/components/form-components/components/FormNotificationsMessageActions.vue index 135e54d..1b9ac5c 100644 --- a/resources/js/components/open/forms/components/form-components/components/FormNotificationsMessageActions.vue +++ b/resources/js/components/open/forms/components/form-components/components/FormNotificationsMessageActions.vue @@ -30,7 +30,7 @@ export default { }, data () { return { - content: this.value + content: this.value ?? {} } }, @@ -48,7 +48,7 @@ export default { watch: {}, - mounted () { + created () { if(this.compVal === undefined || this.compVal === null){ this.compVal = {} } diff --git a/resources/js/components/open/forms/components/form-components/components/FormNotificationsSlack.vue b/resources/js/components/open/forms/components/form-components/components/FormNotificationsSlack.vue index 0de50b8..bfc0d57 100644 --- a/resources/js/components/open/forms/components/form-components/components/FormNotificationsSlack.vue +++ b/resources/js/components/open/forms/components/form-components/components/FormNotificationsSlack.vue @@ -74,6 +74,9 @@ export default { watch: {}, mounted () { + if(!this.form.notification_settings.slack){ + this.form.notification_settings.slack = {} + } }, methods: {} diff --git a/resources/js/pages/forms/edit.vue b/resources/js/pages/forms/edit.vue index 23bf60b..a261fe6 100644 --- a/resources/js/pages/forms/edit.vue +++ b/resources/js/pages/forms/edit.vue @@ -108,6 +108,10 @@ export default { this.updatedForm = new Form(this.form) this.formInitialHash = this.hashString(JSON.stringify(this.updatedForm.data())) } + + if(!this.updatedForm.notification_settings || Array.isArray(this.updatedForm.notification_settings)){ + this.updatedForm.notification_settings = {} + } }, methods: {