From a5615d500df144286ee074ee885bcddd8b1a28f7 Mon Sep 17 00:00:00 2001 From: Pete Matsyburka Date: Fri, 10 May 2024 22:24:44 +0300 Subject: [PATCH] fix missing field steps --- app/javascript/submission_form/form.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/javascript/submission_form/form.vue b/app/javascript/submission_form/form.vue index 0422591a..5248657a 100644 --- a/app/javascript/submission_form/form.vue +++ b/app/javascript/submission_form/form.vue @@ -686,7 +686,7 @@ export default { return this.minimize || (this.orientation?.includes('landscape') && this.isMobile && parseInt(window.innerHeight) < 550) }, currentStepFields () { - return this.stepFields[this.currentStep] + return this.stepFields[this.currentStep] || [] }, browserLanguage () { return (navigator.language || navigator.userLanguage || 'en').split('-')[0] @@ -763,7 +763,7 @@ export default { this.isFormVisible = value }, currentStepFields (value) { - if (!value) { + if (isEmpty(value)) { this.currentStep -= 1 } }