Skip to content

Commit

Permalink
fix negative score
Browse files Browse the repository at this point in the history
  • Loading branch information
roryclear committed Aug 31, 2024
1 parent d767484 commit b40ac22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1180,7 +1180,7 @@
"åland islands": "🇦🇽"
}

let percentage = 100 - Math.round(distance*100 / 13238);
let percentage = Math.max(100 - Math.round(distance*100 / 13238),0);
if(sessionStorage.getItem("percent"+String(i)+"-"+String(days)) == null) {
sessionStorage.setItem("percent"+String(i)+"-"+String(days),String(percentage))
}
Expand Down

0 comments on commit b40ac22

Please sign in to comment.