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

Skill bars should work if cannot parse skill.level #22

Open
michaltalaga opened this issue Jan 17, 2020 · 1 comment
Open

Skill bars should work if cannot parse skill.level #22

michaltalaga opened this issue Jan 17, 2020 · 1 comment

Comments

@michaltalaga
Copy link

atm it's assumed skill level would be one of
switch (str.toLowerCase()) {
case "beginner":
return "25";
case "intermediate":
return "50";
case "advanced":
return "75";
case "master":
return "100";
default:
return parseInt(str)
}

if it's none of the above just a string, a NaN will be the result which then breaks presentation.

maybe hide the floating % tooltip if it's not there?

@XuluWarrior
Copy link
Owner

My apologies for never responding to this. I initially took a look, realised it would need more thought and intended to get back to it. Obviously, I never did.

Did you manage to find a solution that met your needs?
If you (or anybody else) think that you would get benefit from something like this, then I could be persuaded to get my brain focussed on this again. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants