Skip to content

Commit e9f68dc

Browse files
committed
refactor(runtime-vapor): pass vapor slot fallback directly to renderSlot
1 parent 3db1b2e commit e9f68dc

File tree

3 files changed

+2
-9
lines changed

3 files changed

+2
-9
lines changed

packages/runtime-core/src/helpers/renderSlot.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ export function ensureValidVNode(
130130
: null
131131
}
132132

133-
export function ensureVaporSlotFallback(
133+
function ensureVaporSlotFallback(
134134
vnodes: VNodeArrayChildren | null | undefined,
135135
fallback?: () => VNodeArrayChildren,
136136
): void {

packages/runtime-core/src/index.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -608,10 +608,6 @@ export { setRef } from './rendererTemplateRef'
608608
* @internal
609609
*/
610610
export { type VNodeNormalizedRef, normalizeRef } from './vnode'
611-
/**
612-
* @internal
613-
*/
614-
export { ensureVaporSlotFallback } from './helpers/renderSlot'
615611
/**
616612
* @internal
617613
*/

packages/runtime-vapor/src/vdomInterop.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import {
2121
currentInstance,
2222
ensureHydrationRenderer,
2323
ensureRenderer,
24-
ensureVaporSlotFallback,
2524
isEmitListener,
2625
isKeepAlive,
2726
isRef,
@@ -464,12 +463,10 @@ function renderVDOMSlot(
464463
slotsRef.value,
465464
isFunction(name) ? name() : name,
466465
props,
466+
fallback as any,
467467
)
468468

469469
let children = vnode.children as any[]
470-
// handle forwarded vapor slot without its own fallback
471-
// use the fallback provided by the slot outlet
472-
ensureVaporSlotFallback(children, fallback as any)
473470
isValidSlot = children.length > 0
474471
}
475472

0 commit comments

Comments
 (0)