Fix URL pre-fill

This commit is contained in:
Julien Nahum 2024-01-25 06:11:00 +01:00
parent 039b03a5b3
commit 6aec718ef6
1 changed files with 2 additions and 2 deletions

View File

@ -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()