the-accountant icon indicating copy to clipboard operation
the-accountant copied to clipboard

Wrong sorting of years in Game Service

Open pakal opened this issue 7 years ago • 0 comments

This line :

return _(this.steps).map('year').compact().uniq().sort().value();

has a problem : when having 11 years, year 10 and year 11 are sorted before year 2 ; it must confuse strings and numbers.

We use lodash's sortBy() instead,it seems to work.

pakal avatar Apr 17 '17 18:04 pakal