Skip to content

Commit

Permalink
Fix incorrect answer input validation
Browse files Browse the repository at this point in the history
  • Loading branch information
Rickos99 committed Aug 8, 2023
1 parent f9b8990 commit 131d3e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Question.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
if (n === null) return 0;
if (n < 0) return 0;
if (n > 100) return 100;
if (Number.isInteger(n)) return n - (n % 1);
if (!Number.isInteger(n)) return n - (n % 1);
return n;
}
Expand Down

0 comments on commit 131d3e3

Please sign in to comment.