Skip to content

Commit 9f13385

Browse files
committed
fix: directive with single param did not work
1 parent 5c2ff2d commit 9f13385

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/babel-plugin-jsx/src/parseDirectives.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ const parseDirectives = (args: {
7979
arg,
8080
directive: hasDirective ? [
8181
resolveDirective(path, state, tag, directiveName),
82-
val as t.Identifier,
82+
val || value,
8383
!!modifiersSet.size && t.unaryExpression('void', t.numericLiteral(0), true),
8484
!!modifiersSet.size && t.objectExpression(
8585
[...modifiersSet].map(

0 commit comments

Comments
 (0)