Skip to content

Commit

Permalink
allow for null field directives
Browse files Browse the repository at this point in the history
  • Loading branch information
csboling authored and IvanGoncharov committed Jul 4, 2018
1 parent 60ffa76 commit 5bc2601
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export function graphqlLodash(query: string | DocumentNode, operationName?: stri
function getLodashDirectiveArgs(node) {
let lodashNode = null;

for (let directive of node.directives) {
for (let directive of node.directives || []) {
if (directive.name.value !== lodashDirectiveDef.name)
continue;
if (lodashNode)
Expand Down

0 comments on commit 5bc2601

Please sign in to comment.