Skip to content

Commit

Permalink
Fix to condition to get texts for org fetch all
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewtavis committed Jun 30, 2024
1 parent e0261fa commit c6028b0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions frontend/stores/organization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -221,8 +221,9 @@ export const useOrganizationStore = defineStore("organization", {
);

this.organizations = organizationsWithTexts;
this.loading = false;
}

this.loading = false;
},

// MARK: Update
Expand Down

0 comments on commit c6028b0

Please sign in to comment.