From c6028b0f43606bf4c8ab97b57e536b20d36745b7 Mon Sep 17 00:00:00 2001 From: Andrew Tavis McAllister Date: Sun, 30 Jun 2024 18:46:48 +0200 Subject: [PATCH] Fix to condition to get texts for org fetch all --- frontend/stores/organization.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/stores/organization.ts b/frontend/stores/organization.ts index 0ab71a7b3..71f5c2de5 100644 --- a/frontend/stores/organization.ts +++ b/frontend/stores/organization.ts @@ -179,7 +179,7 @@ export const useOrganizationStore = defineStore("organization", { const orgs = responseOrgs.data as unknown as PiniaResOrganizations; - if (orgs) { + if (orgs._value) { const responseOrgTexts = (await Promise.all( orgs._value.map((org) => useAsyncData( @@ -221,8 +221,9 @@ export const useOrganizationStore = defineStore("organization", { ); this.organizations = organizationsWithTexts; - this.loading = false; } + + this.loading = false; }, // MARK: Update