better crown fix

This commit is contained in:
Jack 2020-09-14 21:36:20 +01:00
parent 88067f47a6
commit 6e237a3d15

View file

@ -1908,6 +1908,8 @@ function showResult(difficultyFailed = false) {
config.language,
config.difficulty
).then((highestwpm) => {
hideCrown();
$("#result .stats .wpm .crown").attr('aria-label', '');
if (lpb < stats.wpm && stats.wpm < highestwpm) {
dontShowCrown = true;
}
@ -1918,9 +1920,6 @@ function showResult(difficultyFailed = false) {
hideCrown();
showCrown();
$("#result .stats .wpm .crown").attr('aria-label', '+' + roundTo2(pbDiff));
} else {
hideCrown();
$("#result .stats .wpm .crown").attr('aria-label', '');
}
localPb = true;
}