Skip to content

Commit

Permalink
fix flow
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Apr 25, 2017
1 parent 380e988 commit 38516b4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core/instance/render-helpers/resolve-slots.js
Expand Up @@ -12,13 +12,13 @@ export function resolveSlots (
return slots
}
const defaultSlot = []
let name, child
for (let i = 0, l = children.length; i < l; i++) {
child = children[i]
const child = children[i]
// named slots should only be respected if the vnode was rendered in the
// same context.
if ((child.context === context || child.functionalContext === context) &&
child.data && (name = child.data.slot) != null) {
child.data && child.data.slot != null) {
const name = child.data.slot
const slot = (slots[name] || (slots[name] = []))
if (child.tag === 'template') {
slot.push.apply(slot, child.children)
Expand Down

0 comments on commit 38516b4

Please sign in to comment.