From 5c59e2e27b56fc6b645535b40aa7b5b6c590806b Mon Sep 17 00:00:00 2001 From: Amour1688 Date: Sun, 12 Jul 2020 02:04:51 +0800 Subject: [PATCH] fix: checkIsComponent got wrong result --- packages/babel-plugin-jsx/src/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/babel-plugin-jsx/src/utils.ts b/packages/babel-plugin-jsx/src/utils.ts index f03dd5c..5215da3 100644 --- a/packages/babel-plugin-jsx/src/utils.ts +++ b/packages/babel-plugin-jsx/src/utils.ts @@ -44,7 +44,7 @@ const checkIsComponent = (path: NodePath): boolean => { return !isFragment(namePath); // For withCtx } - const tag = (namePath as NodePath).get('name'); + const tag = (namePath as NodePath).node.name; return !htmlTags.includes(tag) && !svgTags.includes(tag); };