Skip to content

Commit

Permalink
fix(runtime-core): ensure consistent arguments for tempalte and rende…
Browse files Browse the repository at this point in the history
…r funtion slot usage

fix #4367
  • Loading branch information
yyx990803 committed Aug 17, 2021
1 parent c1f564e commit 644971e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/runtime-core/src/componentSlots.ts
Expand Up @@ -63,15 +63,15 @@ const normalizeSlot = (
rawSlot: Function,
ctx: ComponentInternalInstance | null | undefined
): Slot => {
const normalized = withCtx((props: any) => {
const normalized = withCtx((...args: any[]) => {
if (__DEV__ && currentInstance) {
warn(
`Slot "${key}" invoked outside of the render function: ` +
`this will not track dependencies used in the slot. ` +
`Invoke the slot function inside the render function instead.`
)
}
return normalizeSlotValue(rawSlot(props))
return normalizeSlotValue(rawSlot(...args))
}, ctx) as Slot
// NOT a compiled slot
;(normalized as ContextualRenderFn)._c = false
Expand Down

0 comments on commit 644971e

Please sign in to comment.