Skip to content

Commit

Permalink
fix: suspense() not awaited
Browse files Browse the repository at this point in the history
  • Loading branch information
qwerzl committed Dec 26, 2024
1 parent a97fb6c commit 86e5182
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/pages/forms/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ useHead({
const { data, suspense } = useQuery<Form[]>({
queryKey: ['/api/forms/open'],
})
suspense()
await suspense()
if (!data.value) {
toast({
Expand Down
2 changes: 1 addition & 1 deletion app/pages/manage/statuses.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ let dataLoaded = false
const { data, suspense } = useQuery<ClassroomData[]>({
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)
Expand Down

0 comments on commit 86e5182

Please sign in to comment.