Skip to content

Commit

Permalink
Implemented requested changes for PR
Browse files Browse the repository at this point in the history
  • Loading branch information
YoussifHassan8 committed Aug 9, 2024
1 parent 2dd002e commit c460914
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,10 @@ async function get_problems() {

return false;
}
let final_problems = available_problems.slice(0, problems_cnt);
let final_problems = available_problems.slice(
0,
Math.min(problems_cnt, available_problems.length)
);
if (available_problems.length < problems_cnt) {
Swal.fire({
icon: "warning",
Expand Down

0 comments on commit c460914

Please sign in to comment.