Skip to content

Commit

Permalink
fix: handle numAsync correctly when merging
Browse files Browse the repository at this point in the history
  • Loading branch information
vkarpov15 committed Jun 5, 2018
1 parent 952d9db commit fef8e7e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -26,3 +26,5 @@ node_modules

# Users Environment Variables
.lock-wscript

package-lock.json
2 changes: 1 addition & 1 deletion index.js
Expand Up @@ -400,7 +400,7 @@ Kareem.prototype.merge = function(other) {
// Deduplicate based on `fn`
filter(p => sourcePres.map(_p => _p.fn).indexOf(p.fn) === -1);
const combined = sourcePres.concat(deduplicated);
combined.numAsync = ret._pres.get(key).numAsync || 0;
combined.numAsync = sourcePres.numAsync || 0;
combined.numAsync += deduplicated.filter(p => p.isAsync).length;
ret._pres.set(key, combined);
}
Expand Down

0 comments on commit fef8e7e

Please sign in to comment.