Skip to content

Commit c16d28e

Browse files
coreylightpselle
authored andcommitted
fix(auto http data): use maxDepth for flatten method (#29)
* 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
1 parent dc17d82 commit c16d28e

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

.circleci/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
- checkout
2525
- restore_cache:
2626
key: yarn-cache-{{ .Branch }}-{{ checksum "yarn.lock" }}
27+
- run: yarn
2728
- run: yarn run validate
2829
- save_cache:
2930
key: v1-dist-{{ .Environment.CIRCLE_BRANCH }}-{{ .Environment.CIRCLE_SHA1 }}

src/shimmerHttp.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ function wrapHttpRequest({
167167
// add full response data
168168
moduleData[id].response = getResDataObject(res);
169169
// flatten object for easy transformation/filtering later
170-
moduleData[id] = flatten(moduleData[id]);
170+
moduleData[id] = flatten(moduleData[id], { maxDepth: 5 });
171171
moduleData[id] = filterData(config, moduleData[id]);
172172

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

0 commit comments

Comments
 (0)