fixed word config highlighting not working

This commit is contained in:
Miodec 2022-02-04 18:50:46 +01:00
parent d5fae40187
commit fff83ac61e

View file

@ -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();
}