From: Thorsten Lünborg Date: Tue, 10 May 2022 08:41:54 +0000 (+0200) Subject: fix(runtime-core): ensure raw slot function is only normalized once (#5358) X-Git-Tag: v3.2.34-beta.1~69 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e4dffe900a7475c9b4c22c06283b5635e5c2de37;p=thirdparty%2Fvuejs%2Fcore.git fix(runtime-core): ensure raw slot function is only normalized once (#5358) fix: #5343 --- diff --git a/packages/runtime-core/src/componentSlots.ts b/packages/runtime-core/src/componentSlots.ts index ec58fd695c..682a107e67 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(