Skip to content

Commit

Permalink
remove unnecessary ternary
Browse files Browse the repository at this point in the history
  • Loading branch information
dciccale committed Oct 25, 2015
1 parent dfee3cb commit 0c49445
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/traversing.js
Original file line number Diff line number Diff line change
Expand Up @@ -599,13 +599,15 @@ Kimbo.define('traversing', function (_) {

ret = Kimbo.map(this, fn);

// Clean collection
ret = l > 1 && !IS_UNIQUE[name] ? _unique(ret) : ret;

if (Kimbo.isString(selector)) {
ret = _.kimbo(ret).filter(selector);
}

// Remove duplicates
if (!IS_UNIQUE[name]) {
ret = _unique(ret);
}

return _.kimbo(ret);
};
});
Expand Down

0 comments on commit 0c49445

Please sign in to comment.