Commit 0c905bb
fix: correctly sort books with a half-star rating.
When sorting by rating, books with a rating of a half-star aren't sorted
correctly. This was due to the ratings being converted to strings and
those strings used for sorting. A half-star is stored as 5, which means
that the string gets sorted as being above anything starting with 4 or
less. I.e. anything but a full five stars. This has been fixed by doing
the comparison on the int directly.1 parent 882ada6 commit 0c905bb
1 file changed
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
396 | 396 | | |
397 | 397 | | |
398 | 398 | | |
399 | | - | |
400 | | - | |
| 399 | + | |
401 | 400 | | |
402 | 401 | | |
403 | 402 | | |
| |||
0 commit comments