|
|
@@ -145,8 +145,8 @@ export function setCurrentSlotOwner(
|
|
|
* Get the effective slot instance for accessing rawSlots and scopeId.
|
|
|
* Prefers currentSlotOwner (if inside a slot), falls back to currentInstance.
|
|
|
*/
|
|
|
-export function getScopeOwner(): VaporComponentInstance {
|
|
|
- return (currentSlotOwner || currentInstance) as VaporComponentInstance
|
|
|
+export function getScopeOwner(): VaporComponentInstance | null {
|
|
|
+ return (currentSlotOwner || currentInstance) as VaporComponentInstance | null
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -180,7 +180,7 @@ export function createSlot(
|
|
|
const _isLastInsertion = isLastInsertion
|
|
|
if (!isHydrating) resetInsertionState()
|
|
|
|
|
|
- const instance = getScopeOwner()
|
|
|
+ const instance = getScopeOwner()!
|
|
|
const rawSlots = instance.rawSlots
|
|
|
const slotProps = rawProps
|
|
|
? new Proxy(rawProps, rawPropsProxyHandlers)
|