fix: directive with single param did not work

This commit is contained in:
Amour1688 2020-07-15 19:27:49 +08:00
parent 5c2ff2df70
commit 9f133858c5

View File

@ -79,7 +79,7 @@ const parseDirectives = (args: {
arg,
directive: hasDirective ? [
resolveDirective(path, state, tag, directiveName),
val as t.Identifier,
val || value,
!!modifiersSet.size && t.unaryExpression('void', t.numericLiteral(0), true),
!!modifiersSet.size && t.objectExpression(
[...modifiersSet].map(