Skip to content

Commit

Permalink
always return something from filter function
Browse files Browse the repository at this point in the history
  • Loading branch information
coorasse committed Apr 20, 2020
1 parent 8dc58a8 commit d898c02
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@ Spree.Views.Order.DetailsAdjustments = Backbone.View.extend({
collection
.map(function(item) {
return (item.get("adjustments") || [])
.filter(function(adjustment) {
if (adjustment.eligible === true) {
return adjustment;
}
});
.filter(function(adjustment) { return (adjustment.eligible === true); });
})
.flatten(true)
.each(function(adjustment){
Expand Down

0 comments on commit d898c02

Please sign in to comment.