mirror of
https://github.com/oxynote/oxynote.git
synced 2026-10-17 10:59:20 +02:00
fix nuxt context misuse bug
This commit is contained in:
parent
4aa0586a27
commit
d777c32c13
|
|
@ -322,6 +322,7 @@ async function handleMarkAllRead() {
|
|||
</ShadcnUiTooltipTrigger>
|
||||
<ShadcnUiTooltipContent
|
||||
side="bottom"
|
||||
align="start"
|
||||
class="max-w-64 wrap-anywhere"
|
||||
>
|
||||
{{ findNotificationDocumentName(notification) }}
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user