We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
currentRoute
1 parent 48eb02f commit af9fda3Copy full SHA for af9fda3
packages/client/composables/useNav.ts
@@ -277,7 +277,7 @@ const useNavState = createSharedComposable((): SlidevContextNavState => {
277
278
const query = computed(() => {
279
// eslint-disable-next-line ts/no-unused-expressions
280
- router.currentRoute.value.query
+ router?.currentRoute?.value?.query
281
return new URLSearchParams(location.search)
282
})
283
const isPrintMode = computed(() => query.value.has('print') || currentRoute.name === 'export')
0 commit comments