Skip to content

Commit

Permalink
chore: fix flow
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Jan 31, 2019
1 parent 3edb999 commit 6afd96f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/compiler/parser/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export function parse (

// final children cleanup
// filter out scoped slots
element.children = element.children.filter(c => !c.slotScope)
element.children = element.children.filter(c => !(c: any).slotScope)
// remove trailing whitespace node again
trimEndingWhitespace(element)

Expand Down Expand Up @@ -642,7 +642,7 @@ function processSlotContent (el) {
el
)
}
if (!maybeComponent(el.parent)) {
if (el.parent && !maybeComponent(el.parent)) {
warn(
`<template v-slot> can only appear at the root level inside ` +
`the receiving the component`,
Expand Down Expand Up @@ -686,7 +686,7 @@ function processSlotContent (el) {
const slotContainer = slots[name] = createASTElement('template', [], el)
slotContainer.slotTarget = name
slotContainer.slotTargetDynamic = dynamic
slotContainer.children = el.children.filter(c => !c.slotScope)
slotContainer.children = el.children.filter(c => !(c: any).slotScope)
slotContainer.slotScope = slotBinding.value || `_`
// remove children as they are returned from scopedSlots now
el.children = []
Expand Down

0 comments on commit 6afd96f

Please sign in to comment.