From 4cc150010a91c1408a8bad63cd35e8cc2b3e6a12 Mon Sep 17 00:00:00 2001 From: Mateus Eduardo Batista de Medeiros Date: Fri, 24 May 2024 08:02:05 -0300 Subject: [PATCH] fix: breadcrumbs not displayed --- src/components/Header.vue | 4 +--- src/stores/header/index.js | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/components/Header.vue b/src/components/Header.vue index e5c3b95..5cbc130 100644 --- a/src/components/Header.vue +++ b/src/components/Header.vue @@ -18,9 +18,7 @@ export default { }, }, computed: { - ...mapState(useHeaderStore, [ - 'breadcrumbs' - ]), + ...mapState(useHeaderStore, ['breadcrumbs']), }, }; diff --git a/src/stores/header/index.js b/src/stores/header/index.js index 0fb6bbc..0ebbe3d 100644 --- a/src/stores/header/index.js +++ b/src/stores/header/index.js @@ -4,7 +4,7 @@ import { useModulesStore } from '@/stores/modules'; export const useHeaderStore = defineStore('header', { getters: { breadcrumbs() { - const routerName = this.$router.currentRoute.name; + const routerName = this.$route.name; const breadcrumbs = []; const modulesStore = useModulesStore();