diff --git a/components/navbar.vue b/components/navbar.vue index 203f7f4..8e40cbb 100644 --- a/components/navbar.vue +++ b/components/navbar.vue @@ -213,6 +213,11 @@ export default { return this.$nuxt.$route.path } + // If we have a location object, use that. + if ( typeof window !== 'undefined' && typeof window.location === 'object' ) { + return window.location.pathname + } + return '/' } }