Skip to content

Commit

Permalink
Update src/components/code/QuestionToggleModal.tsx
Browse files Browse the repository at this point in the history
Co-authored-by: samyipsh <[email protected]>
  • Loading branch information
Gabau and samyipsh authored Nov 3, 2023
1 parent 9c21eaf commit 7c04c1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/code/QuestionToggleModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const SelectPageDiv = ({
useEffect(() => {
// update the pages range
const newPages = [];
const startPage = currentPage - offset < 0 ? 0 : currentPage - offset;
const startPage = Math.max(currentPage - offset, 0);
for (
let i = startPage;
i < totalPages && i < startPage + actualRange;
Expand Down

0 comments on commit 7c04c1b

Please sign in to comment.