Skip to content

Commit

Permalink
feat(debug): clone debug params to ensure they are not mutated before…
Browse files Browse the repository at this point in the history
… being rendered (pelias#1553)
  • Loading branch information
missinglink authored Aug 16, 2021
1 parent 5c1d3db commit b6ed89d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion controller/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ function setup( peliasConfig, esclient, query, should_execute ){
}
logger.debug('[ES response]', docs);
if (req.clean.enableElasticDebug) {
debugLog.push(req, {ES_response: {docs, meta, data}});
debugLog.push(req, { ES_response: _.cloneDeep({ docs, meta, data }) });
}
next();
});
Expand Down

0 comments on commit b6ed89d

Please sign in to comment.