Skip to content

Commit

Permalink
Fix recursiveFetch to respect fetchOptions.scope on recursion
Browse files Browse the repository at this point in the history
Currently fetchOptions are not passed recursively to child
collection nodes.

This is causing collisions across scoped queries on results
of child collection nodes.
  • Loading branch information
doronrk committed Oct 31, 2019
1 parent 727094a commit 9bd9dcf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/query/lib/recursiveFetch.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function fetch(node, parentObject, fetchOptions = {}) {

_.each(node.collectionNodes, collectionNode => {
_.each(results, result => {
const collectionNodeResults = fetch(collectionNode, result);
const collectionNodeResults = fetch(collectionNode, result, fetchOptions);
result[collectionNode.linkName] = collectionNodeResults;
//delete result[node.linker.linkStorageField];

Expand Down

0 comments on commit 9bd9dcf

Please sign in to comment.