Skip to content

Commit b375636

Browse files
authored
fix(account page): tidy up highest wpm description (@Cosmatevs) (monkeytypegame#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.
1 parent 823e9e0 commit b375636

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

frontend/src/ts/pages/account.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -645,13 +645,12 @@ async function fillContent(): Promise<void> {
645645
});
646646

647647
if (result.wpm > topWpm) {
648-
const puncsctring = result.punctuation ? ",<br>with punctuation" : "";
649-
const numbsctring = result.numbers
650-
? ",<br> " + (result.punctuation ? "&" : "") + "with numbers"
651-
: "";
652648
topWpm = result.wpm;
653-
if (result.mode === "custom") topMode = result.mode;
654-
else {
649+
if (result.mode === "custom") {
650+
topMode = result.mode;
651+
} else {
652+
const puncsctring = result.punctuation ? ",<br>with punctuation" : "";
653+
const numbsctring = result.numbers ? ",<br>with numbers" : "";
655654
topMode = result.mode + " " + result.mode2 + puncsctring + numbsctring;
656655
}
657656
}

0 commit comments

Comments
 (0)