Skip to content

Commit

Permalink
fix(auto http data): use maxDepth for flatten method (#29)
Browse files Browse the repository at this point in the history
* fix(auto http data): use maxDepth for flatten method

If maxDepth is not provided, certain situations can cause inifinite recursion.

fix #28

* update circle to install deps if no cache found
  • Loading branch information
coreylight authored and pselle committed Aug 27, 2018
1 parent dc17d82 commit c16d28e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
- checkout
- restore_cache:
key: yarn-cache-{{ .Branch }}-{{ checksum "yarn.lock" }}
- run: yarn
- run: yarn run validate
- save_cache:
key: v1-dist-{{ .Environment.CIRCLE_BRANCH }}-{{ .Environment.CIRCLE_SHA1 }}
Expand Down
2 changes: 1 addition & 1 deletion src/shimmerHttp.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ function wrapHttpRequest({
// add full response data
moduleData[id].response = getResDataObject(res);
// flatten object for easy transformation/filtering later
moduleData[id] = flatten(moduleData[id]);
moduleData[id] = flatten(moduleData[id], { maxDepth: 5 });
moduleData[id] = filterData(config, moduleData[id]);

// if filter function returns falsey value, drop all data completely
Expand Down

0 comments on commit c16d28e

Please sign in to comment.