Skip to content

Commit 5bc2601

Browse files
csbolingIvanGoncharov
authored andcommitted
allow for null field directives
1 parent 60ffa76 commit 5bc2601

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export function graphqlLodash(query: string | DocumentNode, operationName?: stri
5454
function getLodashDirectiveArgs(node) {
5555
let lodashNode = null;
5656

57-
for (let directive of node.directives) {
57+
for (let directive of node.directives || []) {
5858
if (directive.name.value !== lodashDirectiveDef.name)
5959
continue;
6060
if (lodashNode)

0 commit comments

Comments
 (0)