From 6aec718ef6d3f16e3796fc7fd181beb23b67f67e Mon Sep 17 00:00:00 2001 From: Julien Nahum Date: Thu, 25 Jan 2024 06:11:00 +0100 Subject: [PATCH] Fix URL pre-fill --- client/components/open/forms/OpenForm.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/components/open/forms/OpenForm.vue b/client/components/open/forms/OpenForm.vue index 857dd2d..54269d6 100644 --- a/client/components/open/forms/OpenForm.vue +++ b/client/components/open/forms/OpenForm.vue @@ -238,7 +238,7 @@ export default { mounted () { this.initForm() - if (window.client && window.location.href.includes('auto_submit=true')) { + if (process.client && window.location.href.includes('auto_submit=true')) { this.isAutoSubmit = true this.submitForm() } @@ -316,7 +316,7 @@ export default { } if (this.isPublicFormPage && this.form.auto_save) { let pendingData = this.pendingSubmission.get() - if (pendingData !== null && pendingData) { + if (pendingData !== null && pendingData && Object.keys(this.pendingSubmission.get()).length !== 0) { this.fields.forEach((field) => { if (field.type === 'date' && field.prefill_today === true) { // For Prefill with 'today' const dateObj = new Date()