From e4dffe900a7475c9b4c22c06283b5635e5c2de37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorsten=20L=C3=BCnborg?= Date: Tue, 10 May 2022 10:41:54 +0200 Subject: [PATCH] fix(runtime-core): ensure raw slot function is only normalized once (#5358) fix: #5343 --- packages/runtime-core/src/componentSlots.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/runtime-core/src/componentSlots.ts b/packages/runtime-core/src/componentSlots.ts index ec58fd69..682a107e 100644 --- a/packages/runtime-core/src/componentSlots.ts +++ b/packages/runtime-core/src/componentSlots.ts @@ -63,6 +63,10 @@ const normalizeSlot = ( rawSlot: Function, ctx: ComponentInternalInstance | null | undefined ): Slot => { + if ((rawSlot as any)._n) { + // already normalized - #5353 + return rawSlot as Slot + } const normalized = withCtx((...args: any[]) => { if (__DEV__ && currentInstance) { warn(