mirror of
https://github.com/vuejs/babel-plugin-jsx.git
synced 2025-01-10 16:29:12 +08:00
fix: warning Fragment with condition fails with undefined vnode (#28)
This commit is contained in:
parent
672f27d258
commit
9179e9c7a3
@ -10,7 +10,6 @@ import {
|
||||
getJSXAttributeName,
|
||||
transformJSXText,
|
||||
transformJSXExpressionContainer,
|
||||
isFragment,
|
||||
walksScope,
|
||||
} from './utils';
|
||||
import parseDirectives from './parseDirectives';
|
||||
@ -123,10 +122,6 @@ const buildProps = (path: NodePath<t.JSXElement>, state: State) => {
|
||||
let slots: t.Identifier | t.Expression | null = null;
|
||||
let patchFlag = 0;
|
||||
|
||||
if (isFragment(path.get('openingElement').get('name'))) {
|
||||
patchFlag |= PatchFlags.STABLE_FRAGMENT;
|
||||
}
|
||||
|
||||
if (props.length === 0) {
|
||||
return {
|
||||
tag,
|
||||
@ -239,8 +234,6 @@ const buildProps = (path: NodePath<t.JSXElement>, state: State) => {
|
||||
}
|
||||
}
|
||||
|
||||
console.log(value)
|
||||
|
||||
if (directiveName === 'model' && value) {
|
||||
properties.push(t.objectProperty(
|
||||
t.stringLiteral(`onUpdate:${propName}`),
|
||||
|
Loading…
Reference in New Issue
Block a user