Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When importing Lichess accounts with no games, It will show NaN% Downloaded. #336

Open
TheOddCell opened this issue Aug 3, 2024 · 1 comment · May be fixed by #490
Open

When importing Lichess accounts with no games, It will show NaN% Downloaded. #336

TheOddCell opened this issue Aug 3, 2024 · 1 comment · May be fixed by #490
Labels
type: bug Something isn't working

Comments

@TheOddCell
Copy link

Describe the bug

When you use a Lichess (not tested with chess.com, used browser sign-in) account with NO GAMES PLAYED, it will show NaN% as the download persentage.
image
image

Reproduction

  1. Go to the Accounts tab
  2. Add a Lichess account with browser sign-in THAT HAS NO GAMES PLAYED. Not tested with Chess.com, or without browser sign-in.
  3. Reload and Download the database
  4. Check the download persentage

Platform and versions

Windows 11 Pro 23E2 Build 22631.3958,
Version: 0.10.0
Tauri version: 1.6.1

Stack trace

No response

@TheOddCell TheOddCell added the type: bug Something isn't working label Aug 3, 2024
@zanciks
Copy link

zanciks commented Aug 4, 2024

Seems like a simple fix. en-croissant/src/components/home/AccountCard.tsx line 144 const percentage = ((downloadedGames / total) * 100).toFixed(2);. Just need to add an if statement for if total is 0. What would the expected result be here though? 100%? 0%?
I can add in the fix if anybody has thoughts on what the expected result should be?

@gm-m gm-m linked a pull request Jan 7, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants