mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -07:00
Get location from window if available
This commit is contained in:
parent
bd17f443e5
commit
a440904384
1 changed files with 5 additions and 0 deletions
|
|
@ -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 '/'
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue