File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
packages/runtime-vapor/src Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1032,5 +1032,5 @@ function handleSetupResult(
10321032
10331033export function getCurrentScopeId ( ) : string | undefined {
10341034 const scopeOwner = getScopeOwner ( )
1035- return scopeOwner && scopeOwner . type . __scopeId
1035+ return scopeOwner ? scopeOwner . type . __scopeId : undefined
10361036}
Original file line number Diff line number Diff line change @@ -145,8 +145,8 @@ export function setCurrentSlotOwner(
145145 * Get the effective slot instance for accessing rawSlots and scopeId.
146146 * Prefers currentSlotOwner (if inside a slot), falls back to currentInstance.
147147 */
148- export function getScopeOwner ( ) : VaporComponentInstance {
149- return ( currentSlotOwner || currentInstance ) as VaporComponentInstance
148+ export function getScopeOwner ( ) : VaporComponentInstance | null {
149+ return ( currentSlotOwner || currentInstance ) as VaporComponentInstance | null
150150}
151151
152152/**
@@ -180,7 +180,7 @@ export function createSlot(
180180 const _isLastInsertion = isLastInsertion
181181 if ( ! isHydrating ) resetInsertionState ( )
182182
183- const instance = getScopeOwner ( )
183+ const instance = getScopeOwner ( ) !
184184 const rawSlots = instance . rawSlots
185185 const slotProps = rawProps
186186 ? new Proxy ( rawProps , rawPropsProxyHandlers )
You can’t perform that action at this time.
0 commit comments