Skip to content

Commit

Permalink
chore: fix built on node 4 + 5 again
Browse files Browse the repository at this point in the history
  • Loading branch information
vkarpov15 committed Dec 23, 2017
1 parent 6dac5a4 commit 434ef0a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -367,15 +367,15 @@ Kareem.prototype.merge = function(other) {
const sourcePres = get(ret._pres, key, []);
const deduplicated = other._pres[key].
// Deduplicate based on `fn`
filter(p => !sourcePres.map(_p => _p.fn).includes(p.fn));
filter(p => sourcePres.map(_p => _p.fn).indexOf(p.fn) === -1);
ret._pres[key] = sourcePres.concat(deduplicated);
ret._pres[key].numAsync = get(ret._pres[key], 'numAsync', 0);
ret._pres[key].numAsync += deduplicated.filter(p => p.isAsync).length;
}
for (let key of Object.keys(other._posts)) {
const sourcePosts = get(ret._posts, key, []);
const deduplicated = other._posts[key].
filter(p => !sourcePosts.includes(p));
filter(p => sourcePosts.indexOf(p) === -1);
ret._posts[key] = sourcePosts.concat(deduplicated);
}

Expand Down

0 comments on commit 434ef0a

Please sign in to comment.