From 2bc219a09b8b059d0468510b910e1d9b5561b2bb Mon Sep 17 00:00:00 2001 From: Jon Date: Mon, 18 Nov 2024 06:59:09 +0100 Subject: [PATCH] refactor: refs #8185 modified LeftMenu to avoid duplicates --- src/components/LeftMenu.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/LeftMenu.vue b/src/components/LeftMenu.vue index 6e0ae5907..3bbb5b046 100644 --- a/src/components/LeftMenu.vue +++ b/src/components/LeftMenu.vue @@ -22,7 +22,7 @@ const props = defineProps({ default: 'main', }, }); - +const initialized = ref(false); const items = ref([]); const expansionItemElements = reactive({}); const pinnedModules = computed(() => { @@ -53,11 +53,13 @@ const filteredPinnedModules = computed(() => { onMounted(async () => { await navigation.fetchPinned(); getRoutes(); + initialized.value = true; }); watch( () => route.matched, () => { + if (!initialized.value) return; items.value = []; getRoutes(); }, -- 2.40.1