From b375636c9950e47dbab186fcf6c13d3fed9ee384 Mon Sep 17 00:00:00 2001 From: Nopke <44393502+Cosmatevs@users.noreply.github.com> Date: Mon, 3 Mar 2025 11:18:07 +0100 Subject: [PATCH] fix(account page): tidy up highest wpm description (@cosmatevs) (#6329) ### Description Account page: * remove unnecessary & ![& in highest wpm description](https://github.com/user-attachments/assets/61e01116-2db8-4a80-93f0-c204c6e3349a) * build punctuation and number strings only if they're going to be used ### Checks - [x] Check if any open issues are related to this PR; if so, be sure to tag them below. - [x] Make sure the PR title follows the Conventional Commits standard. (https://www.conventionalcommits.org for more info) - [x] Make sure to include your GitHub username prefixed with @ inside parentheses at the end of the PR title. --- frontend/src/ts/pages/account.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/frontend/src/ts/pages/account.ts b/frontend/src/ts/pages/account.ts index de8c5954d..c33884891 100644 --- a/frontend/src/ts/pages/account.ts +++ b/frontend/src/ts/pages/account.ts @@ -645,13 +645,12 @@ async function fillContent(): Promise { }); if (result.wpm > topWpm) { - const puncsctring = result.punctuation ? ",
with punctuation" : ""; - const numbsctring = result.numbers - ? ",
" + (result.punctuation ? "&" : "") + "with numbers" - : ""; topWpm = result.wpm; - if (result.mode === "custom") topMode = result.mode; - else { + if (result.mode === "custom") { + topMode = result.mode; + } else { + const puncsctring = result.punctuation ? ",
with punctuation" : ""; + const numbsctring = result.numbers ? ",
with numbers" : ""; topMode = result.mode + " " + result.mode2 + puncsctring + numbsctring; } }