From fff83ac61e29d2c1f03f8fd3ace1de4bf2912419 Mon Sep 17 00:00:00 2001 From: Miodec Date: Fri, 4 Feb 2022 18:50:46 +0100 Subject: [PATCH] fixed word config highlighting not working --- src/js/config.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/js/config.js b/src/js/config.js index 35ec3c9f2..10cbef008 100644 --- a/src/js/config.js +++ b/src/js/config.js @@ -1081,10 +1081,11 @@ export function setWordCount(wordCount, nosave) { config.words = wordCount; $("#top .config .wordCount .text-button").removeClass("active"); if (![10, 25, 50, 100, 200].includes(wordCount)) { - $("#top .config .wordCount .text-button[wordCount='custom']").addClass( - "active" - ); + wordCount = "custom"; } + $(`#top .config .wordCount .text-button[wordCount='${wordCount}']`).addClass( + "active" + ); ChallengeContoller.clearActive(); if (!nosave) saveToLocalStorage(); }