fix(compiler-core): only check is prop on <component>

This commit is contained in:
Evan You 2020-01-31 16:15:05 -05:00
parent 74cb207c22
commit 78c4f321cd

View File

@ -73,8 +73,7 @@ export const transformElement: NodeTransform = (node, context) => {
let shouldUseBlock = false
// handle dynamic component
const isProp = findProp(node, 'is')
if (tag === 'component') {
const isProp = tag === 'component' && findProp(node, 'is')
if (isProp) {
// static <component is="foo" />
if (isProp.type === NodeTypes.ATTRIBUTE) {
@ -94,7 +93,6 @@ export const transformElement: NodeTransform = (node, context) => {
)
}
}
}
let nodeType
if (dynamicComponent) {