fix nuxt context misuse bug

This commit is contained in:
swithek 2026-09-02 20:08:55 +02:00
parent 4aa0586a27
commit d777c32c13
2 changed files with 7 additions and 2 deletions

View File

@ -322,6 +322,7 @@ async function handleMarkAllRead() {
</ShadcnUiTooltipTrigger>
<ShadcnUiTooltipContent
side="bottom"
align="start"
class="max-w-64 wrap-anywhere"
>
{{ findNotificationDocumentName(notification) }}

View File

@ -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()