diff --git a/web/app/components/NotificationBox.vue b/web/app/components/NotificationBox.vue index a85fa33f..d372c07d 100644 --- a/web/app/components/NotificationBox.vue +++ b/web/app/components/NotificationBox.vue @@ -322,6 +322,7 @@ async function handleMarkAllRead() { {{ findNotificationDocumentName(notification) }} diff --git a/web/app/pages/[[organizationSlug]]/[[documentSlug]].vue b/web/app/pages/[[organizationSlug]]/[[documentSlug]].vue index b3cce79c..62eaf493 100644 --- a/web/app/pages/[[organizationSlug]]/[[documentSlug]].vue +++ b/web/app/pages/[[organizationSlug]]/[[documentSlug]].vue @@ -32,8 +32,12 @@ definePageMeta({ // resolved before the page renders so capability-gated markup is // already correct server-side and nothing appears then vanishes on - // hydration - await useCapabilitiesAPI().fetchCapabilities.refresh() + // hydration. Instantiated through runWithContext because the vue app + // context is gone after an await, and the query injects its option + // defaults + await nuxtApp.runWithContext(() => + useCapabilitiesAPI().fetchCapabilities.refresh(), + ) if (!to.params.documentSlug || typeof to.params.documentSlug !== "string") { const docTree = await fetchDocumentTree.refresh()