diff --git a/packages/frontend-shared/src/composables/examples/UseCohortsExample.vue b/packages/frontend-shared/src/composables/examples/UseCohortsExample.vue index ded7917beb00..2b7c5fe939b3 100644 --- a/packages/frontend-shared/src/composables/examples/UseCohortsExample.vue +++ b/packages/frontend-shared/src/composables/examples/UseCohortsExample.vue @@ -1,6 +1,5 @@ diff --git a/packages/frontend-shared/src/gql-components/composables/useCohorts.ts b/packages/frontend-shared/src/gql-components/composables/useCohorts.ts index c399c6b6d487..b5498b35728e 100644 --- a/packages/frontend-shared/src/gql-components/composables/useCohorts.ts +++ b/packages/frontend-shared/src/gql-components/composables/useCohorts.ts @@ -61,7 +61,7 @@ export const useCohorts = () => { * * @returns a reactive reference to the cohort option that is selected */ - const getCohort = async (config: CohortConfig) => { + const getCohort = (config: CohortConfig) => { const cohortOptionSelected = ref() const { name, options } = config @@ -78,7 +78,8 @@ export const useCohorts = () => { cohortOptionSelected.value = options.find((option) => option.cohort === cohortSelected.data?.determineCohort?.cohort) } - await fetchCohort() + // ts-disable:no-floating-promises TODO: This should be awaiting the fetchCohort call + fetchCohort() } return cohortOptionSelected