Skip to content

Commit

Permalink
perf(key recorder): concat first
Browse files Browse the repository at this point in the history
  • Loading branch information
yidinghan committed May 5, 2017
1 parent e4c718f commit e8acd4c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,12 @@ exports.keysRecorder = (payload = {}) => {
unselects = [],
} = payload;

const finalSelects = defaults.concat(selects);
return (target) => {
if (!target) { return {}; }

const logObject = {};
defaults.concat(selects).forEach((path) => {
finalSelects.forEach((path) => {
set(logObject, path, get(target, path));
});
unselects.forEach((path) => {
Expand Down

0 comments on commit e8acd4c

Please sign in to comment.