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
  • Loading branch information
LinusBorg authored May 10, 2022
1 parent 8e31765 commit e4dffe9
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 e4dffe9

Please sign in to comment.