: rawSlots
: EMPTY_OBJ
- const scopeOwner = getScopeOwner()
- this.scopeId = scopeOwner && scopeOwner.type.__scopeId
+ this.scopeId = getCurrentScopeId()
// apply custom element special handling
if (comp.ce) {
;(el as any).$root = isSingleRoot
if (!isHydrating) {
- const scopeOwner = getScopeOwner()
- const scopeId = scopeOwner!.type.__scopeId
+ const scopeId = getCurrentScopeId()
if (scopeId) setScopeId(el, [scopeId])
}
popWarningContext()
}
}
+
+export function getCurrentScopeId(): string | undefined {
+ const scopeOwner = getScopeOwner()
+ return scopeOwner && scopeOwner.type.__scopeId
+}
type VaporComponent,
VaporComponentInstance,
createComponent,
+ getCurrentScopeId,
isVaporComponent,
mountComponent,
unmountComponent,
} from '@vue/shared'
import { type RawProps, rawPropsProxyHandlers } from './componentProps'
import type { RawSlots, VaporSlot } from './componentSlots'
-import { currentSlotScopeIds, getScopeOwner } from './componentSlots'
+import { currentSlotScopeIds } from './componentSlots'
import { renderEffect } from './renderEffect'
import { _next, createTextNode } from './dom/node'
import { optimizePropertyLookup } from './dom/prop'
frag.nodes = vnode.el as any
}
- const scopeOwner = getScopeOwner()
- vnode.scopeId = (scopeOwner && scopeOwner.type.__scopeId) || null
+ vnode.scopeId = getCurrentScopeId() || null
vnode.slotScopeIds = currentSlotScopeIds
frag.insert = (parentNode, anchor, transition) => {