Fix issue when empty plans sorting to of terraform reports widget in MRs
-
Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA. As a benefit of being a GitLab Community Contributor, you receive complimentary access to GitLab Duo.
Fix issue when empty plans sorting to of terraform reports widget in MRs
The intention of !183300 (merged) was that these are sorted to the bottom, but I misunderstood the behaviour of Number(''). It produces 0, not NaN. Additionally, it works that that 0 counts as false for the purposes of (0 || MAX_VALUE) which is obvious in retrospect. So fix that, too.
Added some more explanatory comments, and an additional test to cover the cases discovered here.
| Before | After |
|---|---|
![]() |
![]() |
How to set up and validate locally
Reproduction steps covered in the linked issue
Related to #525645 (closed)
Edited by Anna Vovchenko

