fix(compiler-core): only check is prop on <component>
This commit is contained in:
parent
74cb207c22
commit
78c4f321cd
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user