Browse Source

fix: ensure proxied normal slot uses correct key

dev
Evan You 6 years ago
parent
commit
b32c4b6935
  1. 6
      src/core/vdom/helpers/normalize-scoped-slots.js

6
src/core/vdom/helpers/normalize-scoped-slots.js

@ -19,7 +19,7 @@ export function normalizeScopedSlots (
} }
// expose normal slots on scopedSlots // expose normal slots on scopedSlots
for (const key in normalSlots) { for (const key in normalSlots) {
res[key] = () => normalSlots[key] res[key] = proxyNormalSlot(normalSlots, key)
} }
res._normalized = true res._normalized = true
return res return res
@ -31,3 +31,7 @@ function normalizeScopedSlot(fn: Function) {
return Array.isArray(res) ? res : res ? [res] : res return Array.isArray(res) ? res : res ? [res] : res
} }
} }
function proxyNormalSlot(slots, key) {
return () => slots[key]
}

Loading…
Cancel
Save