From 86e5182a7011c8c5a6ec9cac8fcee7827218e6a2 Mon Sep 17 00:00:00 2001 From: qwerzl Date: Thu, 26 Dec 2024 16:57:41 +0800 Subject: [PATCH] fix: `suspense()` not awaited --- app/pages/forms/index.vue | 2 +- app/pages/manage/statuses.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/pages/forms/index.vue b/app/pages/forms/index.vue index 79389a46..91d90073 100644 --- a/app/pages/forms/index.vue +++ b/app/pages/forms/index.vue @@ -21,7 +21,7 @@ useHead({ const { data, suspense } = useQuery({ queryKey: ['/api/forms/open'], }) -suspense() +await suspense() if (!data.value) { toast({ diff --git a/app/pages/manage/statuses.vue b/app/pages/manage/statuses.vue index 5d458fec..af52b783 100644 --- a/app/pages/manage/statuses.vue +++ b/app/pages/manage/statuses.vue @@ -26,7 +26,7 @@ let dataLoaded = false const { data, suspense } = useQuery({ queryKey: ['/api/reservation/classroomId'], }) -suspense() +await suspense() if (data.value) { data.value = data.value.sort((a: any, b: any) => a.name < b.name ? -1 : 1)