MCPcopy
hub / github.com/vuejs/core / cleanup

Function cleanup

packages/runtime-core/src/apiSetupHelpers.ts:555–561  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

553 // We only need to balance ctx.scope.on() from setCurrentInstance(ctx),
554 // then clear global currentInstance for user microtasks.
555 const cleanup = () => {
556 if (getCurrentInstance() !== ctx) ctx.scope.off()
557 unsetCurrentInstance()
558 if (inSSRSetup) {
559 setInSSRSetupState(false)
560 }
561 }
562
563 if (isPromise(awaitable)) {
564 awaitable = awaitable.catch(e => {

Callers 3

cleanupEffectFunction · 0.50
watchFunction · 0.50
jobFunction · 0.50

Calls 3

getCurrentInstanceFunction · 0.90
unsetCurrentInstanceFunction · 0.90
offMethod · 0.65

Tested by

no test coverage detected