From 9179e9c7a311afeee4e7f2668ddb1ff64b83bb08 Mon Sep 17 00:00:00 2001 From: Amour1688 <31695475+Amour1688@users.noreply.github.com> Date: Tue, 14 Jul 2020 10:38:34 +0800 Subject: [PATCH] fix: warning Fragment with condition fails with undefined vnode (#28) --- packages/babel-plugin-jsx/src/transform-vue-jsx.ts | 7 ------- 1 file changed, 7 deletions(-) diff --git a/packages/babel-plugin-jsx/src/transform-vue-jsx.ts b/packages/babel-plugin-jsx/src/transform-vue-jsx.ts index 6e98d8f..a976ae4 100644 --- a/packages/babel-plugin-jsx/src/transform-vue-jsx.ts +++ b/packages/babel-plugin-jsx/src/transform-vue-jsx.ts @@ -10,7 +10,6 @@ import { getJSXAttributeName, transformJSXText, transformJSXExpressionContainer, - isFragment, walksScope, } from './utils'; import parseDirectives from './parseDirectives'; @@ -123,10 +122,6 @@ const buildProps = (path: NodePath, 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, state: State) => { } } - console.log(value) - if (directiveName === 'model' && value) { properties.push(t.objectProperty( t.stringLiteral(`onUpdate:${propName}`),