Commit 659ca5e
committed
Fix NaN comparator skipping tiebreaker in project sorting
When both projects lack timestamps and have no threads, getProjectSortTimestamp
returns NEGATIVE_INFINITY for both. Subtracting NEGATIVE_INFINITY - NEGATIVE_INFINITY
yields NaN, and since NaN !== 0 is true, the comparator returned NaN instead of
falling through to the name/id tiebreaker. Add Number.isNaN guard to the condition.1 parent d9ef0ca commit 659ca5e
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
270 | 270 | | |
271 | 271 | | |
272 | 272 | | |
273 | | - | |
| 273 | + | |
274 | 274 | | |
275 | 275 | | |
276 | 276 | | |
0 commit comments