diff --git a/packages/theme/components/BottomNavigation.vue b/packages/theme/components/BottomNavigation.vue index 74194fe8b..28c24d78f 100644 --- a/packages/theme/components/BottomNavigation.vue +++ b/packages/theme/components/BottomNavigation.vue @@ -113,7 +113,7 @@ export default defineComponent({ const handleHomeClick = async () => { const homePath = app.localeRoute({ name: 'home' }); await router.push(homePath); - if (isMobileMenuOpen) { + if (isMobileMenuOpen.value) { toggleMobileMenu(); } }; diff --git a/packages/theme/test-utils/mocks/useUiState.ts b/packages/theme/test-utils/mocks/useUiState.ts index 158f191a0..3547cdac2 100644 --- a/packages/theme/test-utils/mocks/useUiState.ts +++ b/packages/theme/test-utils/mocks/useUiState.ts @@ -1,5 +1,8 @@ +import { computed } from '@nuxtjs/composition-api'; + export const useUiStateMock = (extend = {}) => ({ - isCartSidebarOpen: false, + isCartSidebarOpen: computed(() => false), + isMobileMenuOpen: computed(() => false), changeToCategoryGridView: jest.fn(), changeToCategoryListView: jest.fn(), toggleCartSidebar: jest.fn(),