Commit b30e7d4
fix: normalize pagination inputs to finite integers
Coerce offset/limit to finite integers via Number.isFinite and
Math.trunc before using them for slice and returning in metadata.
Prevents NaN, fractional, or infinite values from producing invalid
display ranges.
Co-Authored-By: Vijay Yadav <[email protected]>1 parent 3528f48 commit b30e7d4
1 file changed
+4
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1014 | 1014 | | |
1015 | 1015 | | |
1016 | 1016 | | |
1017 | | - | |
1018 | | - | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
1019 | 1021 | | |
1020 | 1022 | | |
1021 | 1023 | | |
| |||
0 commit comments