From e215e8b7c26cf6b2282f33b3b0846e702023cc87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Bult=C3=A9?= Date: Mon, 12 Aug 2024 18:41:02 +0200 Subject: [PATCH] impact from ref to config.extras --- src/utils/bouquet.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/utils/bouquet.ts b/src/utils/bouquet.ts index 4f04a53d..18f18422 100644 --- a/src/utils/bouquet.ts +++ b/src/utils/bouquet.ts @@ -75,11 +75,11 @@ export function useBreadcrumbLinksForTopic( theme: Ref, subtheme: Ref, topic: Ref, - pageAllTopics: Ref + pageAllTopics: Ref ): ComputedRef { return computed(() => { const breadcrumbs = [{ to: '/', text: 'Accueil' }] - if (pageAllTopics) { + if (pageAllTopics.value === true) { breadcrumbs.push({ to: `/${topicSlug}`, text: `${topicName}s` }) } @@ -103,7 +103,7 @@ export function useBreadcrumbLinksForTopic( export function useExtras( topic: Ref, - extrasProperty: Ref + extrasProperty: string ): { theme: Ref subtheme: Ref @@ -116,10 +116,10 @@ export function useExtras( const clonedFrom = ref(null) watch( - [topic, extrasProperty], + [topic], () => { - const extras = topic.value?.extras[extrasProperty.value] - if (extras) { + const extras = topic.value?.extras[extrasProperty] + if (extras != null) { theme.value = extras.theme subtheme.value = extras.subtheme datasetsProperties.value = extras.datasets_properties ?? []