fixed quote length filters not selecting correctly

This commit is contained in:
Miodec 2022-02-20 02:41:18 +01:00
parent 43562ea375
commit dba083d1e9

View file

@ -451,13 +451,18 @@ $(".pageAccount .topFilters .button.currentConfigFilter").click(() => {
filters["words"]["custom"] = true;
}
} else if (Config.mode === "quote") {
(
Object.keys(
getGroup("quoteLength")
) as MonkeyTypes.Filter<"quoteLength">[]
).forEach((ql) => {
// TODO figure out how to fix this
filters["quoteLength"][ql] = true;
const filterName: MonkeyTypes.Filter<"quoteLength">[] = [
"short",
"medium",
"long",
"thicc",
];
filterName.forEach((ql, index) => {
if (Config.quoteLength.includes(index as MonkeyTypes.QuoteLength)) {
filters["quoteLength"][ql] = true;
} else {
filters["quoteLength"][ql] = false;
}
});
}
if (Config.punctuation) {