Commit 8db7335
committed
Fix bug preventing paginator from working on first load
The paginator widget in the changeset list sidebar had an odd behavior
where the prev/next arrows did not work after initial page load, and
would only start working once you clicked on a specific page number
(e.g '2'). Turns out this is because of some sneaky square brackets in
one of the Redux selectors which caused pageIndex to be accidentally
converted into an array `[0]`. The expression `[0] + 1` evaluates to
the string `"01"` in JavaScript (of course it does), resulting in the
frontend trying to fetch page `01`, then `011`, then `0111`, etc on each
subsequent click of the next button, none of which would succeed.1 parent c0a16df commit 8db7335
1 file changed
+2
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
54 | | - | |
55 | | - | |
| 53 | + | |
| 54 | + | |
56 | 55 | | |
57 | 56 | | |
58 | 57 | | |
| |||
0 commit comments