Skip to content

Commit b7c2485

Browse files
LinusBorgiwusong
authored andcommitted
fix(runtime-core): ensure raw slot function is only normalized once (vuejs#5358)
fix: vuejs#5343
1 parent b741d5d commit b7c2485

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/runtime-core/src/componentSlots.ts

+4
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ const normalizeSlot = (
6363
rawSlot: Function,
6464
ctx: ComponentInternalInstance | null | undefined
6565
): Slot => {
66+
if ((rawSlot as any)._n) {
67+
// already normalized - #5353
68+
return rawSlot as Slot
69+
}
6670
const normalized = withCtx((...args: any[]) => {
6771
if (__DEV__ && currentInstance) {
6872
warn(

0 commit comments

Comments
 (0)