Skip to content
This repository has been archived by the owner on Jul 20, 2023. It is now read-only.

Commit

Permalink
Fix zero score is skipped
Browse files Browse the repository at this point in the history
  • Loading branch information
chxru committed Jul 10, 2023
1 parent d58ec67 commit 378ef56
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const App = () => {
const time = (evt.target as any)[`time_${i + 1}`].value;
const score = parseFloat((evt.target as any)[`score_${i + 1}`].value);

if (!name || !score) continue;
if (!name || score == undefined) continue;

data.push({ name, score, time });

Expand Down
2 changes: 1 addition & 1 deletion src/SchoolConfig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const App = () => {
const time = (evt.target as any)[`time_${i + 1}`].value;
const score = parseFloat((evt.target as any)[`score_${i + 1}`].value);

if (!name || !score) continue;
if (!name || score == undefined) continue;

data.push({ name, score, time });

Expand Down

0 comments on commit 378ef56

Please sign in to comment.