Skip to content

Commit

Permalink
Avoid fetching null paths
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeroen Cranendonk committed Oct 29, 2020
1 parent bccaa34 commit f688098
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 4 additions & 4 deletions lib/get/walkPath.js
Expand Up @@ -44,10 +44,10 @@ module.exports = function walkPath(model, root, curr, path, depth, seed,
// loop over every key in the key set
do {
if (key == null) {
// Skip null/undefined/empty keysets in path and do not descend, but capture the partial path in the result
onValueType(model, curr, path, depth, seed, outerResults, branchInfo,
requestedPath, optimizedPath, optimizedLength,
isJSONG, fromReference);
// Skip null/undefined/empty keysets in path and do not descend,
// but capture the partial path in the result
onValue(model, curr, seed, depth, outerResults, branchInfo,
requestedPath, optimizedPath, optimizedLength, isJSONG);

if (iteratorNote && !iteratorNote.done) {
key = iterateKeySet(keySet, iteratorNote);
Expand Down
2 changes: 0 additions & 2 deletions test/get-core/edges.spec.js
Expand Up @@ -20,8 +20,6 @@ describe('Edges', function() {
}
},
cache: cacheGenerator(0, 1),
requestedMissingPaths: [],
optimizedMissingPaths: []
});
});
it('should report an atom of undefined in non-progressive mode.', function() {
Expand Down

0 comments on commit f688098

Please sign in to comment.