]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
fix(runtime-core): ensure raw slot function is only normalized once (#5358)
authorThorsten Lünborg <t.luenborg@googlemail.com>
Tue, 10 May 2022 08:41:54 +0000 (10:41 +0200)
committerGitHub <noreply@github.com>
Tue, 10 May 2022 08:41:54 +0000 (04:41 -0400)
fix: #5343

packages/runtime-core/src/componentSlots.ts

index ec58fd695c0692cf3a6c1b7368e7c518331e74a6..682a107e676f57392049ea1c1ff35d3559dace5c 100644 (file)
@@ -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(