Skip to content

Commit e1ce8c4

Browse files
committed
fix(graphql/plugin): correct SystaxKind.Identifier check statement in getIdentifierFromName
1 parent 3e1c3e9 commit e1ce8c4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/graphql/lib/plugin/utils/ast-utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ export function getDecoratorName(decorator: Decorator) {
144144

145145
function getIdentifierFromName(expression: LeftHandSideExpression) {
146146
const identifier = getNameFromExpression(expression);
147-
if (expression && expression.kind !== SyntaxKind.Identifier) {
147+
if (identifier && identifier.kind !== SyntaxKind.Identifier) {
148148
throw new Error();
149149
}
150150
return identifier;

0 commit comments

Comments
 (0)