Skip to content

Commit 6afd96f

Browse files
committed
chore: fix flow
1 parent 3edb999 commit 6afd96f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: src/compiler/parser/index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ export function parse (
149149

150150
// final children cleanup
151151
// filter out scoped slots
152-
element.children = element.children.filter(c => !c.slotScope)
152+
element.children = element.children.filter(c => !(c: any).slotScope)
153153
// remove trailing whitespace node again
154154
trimEndingWhitespace(element)
155155

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

0 commit comments

Comments
 (0)