Skip to content

Commit 644971e

Browse files
committed
fix(runtime-core): ensure consistent arguments for tempalte and render funtion slot usage
fix #4367
1 parent c1f564e commit 644971e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/runtime-core/src/componentSlots.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,15 @@ const normalizeSlot = (
6363
rawSlot: Function,
6464
ctx: ComponentInternalInstance | null | undefined
6565
): Slot => {
66-
const normalized = withCtx((props: any) => {
66+
const normalized = withCtx((...args: any[]) => {
6767
if (__DEV__ && currentInstance) {
6868
warn(
6969
`Slot "${key}" invoked outside of the render function: ` +
7070
`this will not track dependencies used in the slot. ` +
7171
`Invoke the slot function inside the render function instead.`
7272
)
7373
}
74-
return normalizeSlotValue(rawSlot(props))
74+
return normalizeSlotValue(rawSlot(...args))
7575
}, ctx) as Slot
7676
// NOT a compiled slot
7777
;(normalized as ContextualRenderFn)._c = false

0 commit comments

Comments
 (0)