diff --git a/components/Project/Create/Categories/BasicInfo.vue b/components/Project/Create/Categories/BasicInfo.vue index 7aa0045..54bb655 100644 --- a/components/Project/Create/Categories/BasicInfo.vue +++ b/components/Project/Create/Categories/BasicInfo.vue @@ -38,8 +38,8 @@ resetForm({ }, }) -function isFormValid() { - validate() +async function isFormValid() { + await validate() if (meta.value.valid) { return true diff --git a/components/Project/Create/Categories/Funding.vue b/components/Project/Create/Categories/Funding.vue index 810ee80..8cd90c7 100644 --- a/components/Project/Create/Categories/Funding.vue +++ b/components/Project/Create/Categories/Funding.vue @@ -11,7 +11,7 @@ type Fundings = { } function useFundings(project?: Partial) { - const fundings = ref(Array.isArray(project?.funding) ? project?.funding as unknown as Fundings[] : [project?.funding as unknown as Fundings]) + const fundings = ref(Array.isArray(project?.funding) ? project.funding : (project?.funding ? [project.funding] : [])) const newFunding = reactive({ name: '', link: '', @@ -58,7 +58,7 @@ defineExpose({ />