Skip to content

Fix unsubscribe handling in embed-pdf component#676

Open
keepitterron wants to merge 1 commit into
embedpdf:mainfrom
keepitterron:patch-1
Open

Fix unsubscribe handling in embed-pdf component#676
keepitterron wants to merge 1 commit into
embedpdf:mainfrom
keepitterron:patch-1

Conversation

@keepitterron

Copy link
Copy Markdown

Vue's lifecycle injection APIs must run synchronously during setup() (or synchronously inside another hook). After an await, the active-instance context is gone — hence "onBeforeUnmount is called when there is no active component instance".

Register onBeforeUnmount synchronously in setup, tracking unsubscribe via an outer variable that the async onMounted assigns. Same cleanup behavior, just wired at the right time.

Vue's lifecycle injection APIs must run synchronously during setup() (or synchronously inside another hook). After an await, the active-instance context is gone — hence "onBeforeUnmount is called when there is no active component instance".

Register `onBeforeUnmount` synchronously in setup, tracking unsubscribe via an outer variable that the async onMounted assigns. Same cleanup behavior, just wired at the right time.
@vercel

vercel Bot commented Jun 14, 2026

Copy link
Copy Markdown

@keepitterron is attempting to deploy a commit to the OpenBook Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant