From 6e237a3d15190986d1a9e991e7c3676fc3555b32 Mon Sep 17 00:00:00 2001 From: Jack Date: Mon, 14 Sep 2020 21:36:20 +0100 Subject: [PATCH] better crown fix --- public/js/script.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/public/js/script.js b/public/js/script.js index 1b247c304..151ae17fc 100644 --- a/public/js/script.js +++ b/public/js/script.js @@ -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; }