Skip to content

Commit

Permalink
fix: ensure proxied normal slot uses correct key
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Jan 10, 2019
1 parent d855027 commit b32c4b6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/core/vdom/helpers/normalize-scoped-slots.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export function normalizeScopedSlots (
}
// expose normal slots on scopedSlots
for (const key in normalSlots) {
res[key] = () => normalSlots[key]
res[key] = proxyNormalSlot(normalSlots, key)
}
res._normalized = true
return res
Expand All @@ -31,3 +31,7 @@ function normalizeScopedSlot(fn: Function) {
return Array.isArray(res) ? res : res ? [res] : res
}
}

function proxyNormalSlot(slots, key) {
return () => slots[key]
}

0 comments on commit b32c4b6

Please sign in to comment.