Commit 45f2540
authored
fix(usediscover hook): detect end of pagination when totalSize is a multiple of pageSize (#1649)
Fixes a crash on the `/discover/watchlist` page that occurred when the number of items was exactly a
multiple of the page size (e.g., 80, 100, 120). The issue was caused by incorrect end-of-pagination
detection, leading to infinite data fetching. This update adjusts the `isReachingEnd` condition to
correctly handle these edge cases by checking if `totalResults` is less than or equal to the
expected total based on `size * pageSize`.
fix #16231 parent 123894b commit 45f2540
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
| 141 | + | |
141 | 142 | | |
142 | 143 | | |
143 | 144 | | |
| |||
0 commit comments