diff --git a/dashboard/src/components/AppImportDialog.vue b/dashboard/src/components/AppImportDialog.vue index 9be5d5766..e5682a4bb 100644 --- a/dashboard/src/components/AppImportDialog.vue +++ b/dashboard/src/components/AppImportDialog.vue @@ -25,8 +25,8 @@ const encryptionPassword = ref(''); const encryptedFilenames = ref(false); const isFormValid = ref(false); -function validateForm() { - isFormValid.value = form.value && form.value.checkValidity(); +function checkValidity() { + isFormValid.value = form.value ? form.value.checkValidity() : false; } async function onSubmit() { @@ -251,7 +251,7 @@ function onBackupConfigChanged(event) { } } - setTimeout(validateForm, 100); // update state of the confirm button + setTimeout(checkValidity, 100); // update state of the confirm button }; reader.readAsText(event.target.files[0]); @@ -262,7 +262,7 @@ function onUploadBackupConfig() { } watchEffect(() => { - if (providerConfig.value.credentials) setTimeout(validateForm, 100); + if (providerConfig.value.credentials) setTimeout(checkValidity, 100); }); defineExpose({ @@ -310,7 +310,7 @@ defineExpose({
-