Skip to content

Commit

Permalink
fix(runtime-core): ensure raw slot function is only normalized once
Browse files Browse the repository at this point in the history
fix: #5343
  • Loading branch information
LinusBorg committed Feb 3, 2022
1 parent a51f935 commit 604420b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/runtime-core/src/componentSlots.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 604420b

Please sign in to comment.