Commit ee32dfc
Sort IntersectionObserver thresholds numerically (#58245)
Summary:
Both standard `threshold` and React Native `rnRootThreshold` arrays currently use default lexicographic sorting. Add numeric comparators so valid small values whose string forms use exponent notation are exposed in ascending numeric order, and cover both normalization paths.
Fixes #58244.
## Changelog:
[GENERAL] [FIXED] - Sort IntersectionObserver threshold arrays numerically.
Pull Request resolved: #58245
Test Plan:
- Exact upstream focused run: 108 existing tests passed and both new threshold assertions failed.
- Fixed focused Fantom run: 110/110 passed across two suites.
- Fresh Flow check: 0 errors.
- Targeted no-ignore ESLint, Prettier, and `git diff --check` passed.
Only incorrectly ordered threshold arrays change.
Reviewed By: cortinico
Differential Revision: D118266760
Pulled By: javache
fbshipit-source-id: 24c8daf4fec16a41d91e583a9c49623bb68025eb1 parent 790289c commit ee32dfc
2 files changed
Lines changed: 11 additions & 2 deletions
File tree
- packages/react-native/src/private/webapis/intersectionobserver
- __tests__
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
323 | 323 | | |
324 | 324 | | |
325 | 325 | | |
326 | | - | |
| 326 | + | |
327 | 327 | | |
328 | 328 | | |
329 | 329 | | |
| |||
359 | 359 | | |
360 | 360 | | |
361 | 361 | | |
362 | | - | |
| 362 | + | |
363 | 363 | | |
364 | 364 | | |
365 | 365 | | |
| |||
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
321 | 321 | | |
322 | 322 | | |
323 | 323 | | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
324 | 328 | | |
325 | 329 | | |
326 | 330 | | |
| |||
427 | 431 | | |
428 | 432 | | |
429 | 433 | | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
430 | 439 | | |
431 | 440 | | |
432 | 441 | | |
| |||
0 commit comments