From 2004d89a781c066fecf201a56d1f82942a8d9a72 Mon Sep 17 00:00:00 2001 From: Miodec Date: Wed, 31 Aug 2022 01:28:01 +0200 Subject: [PATCH] fixed breakdown only showing punctuation if both punctuation and numbers are enabled --- frontend/src/ts/elements/account-button.ts | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/frontend/src/ts/elements/account-button.ts b/frontend/src/ts/elements/account-button.ts index 2e06c8cd8..e292d5538 100644 --- a/frontend/src/ts/elements/account-button.ts +++ b/frontend/src/ts/elements/account-button.ts @@ -196,14 +196,17 @@ async function animateXpBreakdown( await Misc.sleep(delay); await append(`quote +${breakdown["quote"]}`); total += breakdown["quote"]; - } else if (breakdown["punctuation"]) { - await Misc.sleep(delay); - await append(`punctuation +${breakdown["punctuation"]}`); - total += breakdown["punctuation"]; - } else if (breakdown["numbers"]) { - await Misc.sleep(delay); - await append(`numbers +${breakdown["numbers"]}`); - total += breakdown["numbers"]; + } else { + if (breakdown["punctuation"]) { + await Misc.sleep(delay); + await append(`punctuation +${breakdown["punctuation"]}`); + total += breakdown["punctuation"]; + } + if (breakdown["numbers"]) { + await Misc.sleep(delay); + await append(`numbers +${breakdown["numbers"]}`); + total += breakdown["numbers"]; + } } if (skipBreakdown) return;