Skip to content

Commit 4fdb550

Browse files
committed
fix(runtime-core): make cache indexes marker non-enumerable in initSlots
1 parent a6e2032 commit 4fdb550

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/runtime-core/src/componentSlots.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,10 @@ export const initSlots = (
193193
): void => {
194194
const slots = (instance.slots = createInternalObject())
195195
if (instance.vnode.shapeFlag & ShapeFlags.SLOTS_CHILDREN) {
196+
const cacheIndexes = (children as RawSlots).__
197+
// make cache indexes marker non-enumerable
198+
if (cacheIndexes) def(slots, '__', cacheIndexes, true)
199+
196200
const type = (children as RawSlots)._
197201
if (type) {
198202
assignSlots(slots, children as Slots, optimized)

0 commit comments

Comments
 (0)