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
|
let shouldUseBlock = false
|
||||||
|
|
||||||
// handle dynamic component
|
// handle dynamic component
|
||||||
const isProp = findProp(node, 'is')
|
const isProp = tag === 'component' && findProp(node, 'is')
|
||||||
if (tag === 'component') {
|
|
||||||
if (isProp) {
|
if (isProp) {
|
||||||
// static <component is="foo" />
|
// static <component is="foo" />
|
||||||
if (isProp.type === NodeTypes.ATTRIBUTE) {
|
if (isProp.type === NodeTypes.ATTRIBUTE) {
|
||||||
@ -94,7 +93,6 @@ export const transformElement: NodeTransform = (node, context) => {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
let nodeType
|
let nodeType
|
||||||
if (dynamicComponent) {
|
if (dynamicComponent) {
|
||||||
|
Loading…
Reference in New Issue
Block a user