Skip to content

Commit 2ab8c41

Browse files
committed
fix(slots): dynamically named slots should be keyed by name
fix #2535
1 parent 6e46a57 commit 2ab8c41

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/runtime-core/src/helpers/renderSlot.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export function renderSlot(
4747
const validSlotContent = slot && ensureValidVNode(slot(props))
4848
const rendered = createBlock(
4949
Fragment,
50-
{ key: props.key },
50+
{ key: props.key || `_${name}` },
5151
validSlotContent || (fallback ? fallback() : []),
5252
validSlotContent && (slots as RawSlots)._ === SlotFlags.STABLE
5353
? PatchFlags.STABLE_FRAGMENT

0 commit comments

Comments
 (0)