Skip to content

Commit ebebd76

Browse files
committed
fix: funbox classes not cleared
remove fb- classes when updating funbox classes to currently active funboxes closes monkeytypegame#6161
1 parent da70476 commit ebebd76

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

frontend/src/ts/test/funbox/funbox.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,11 @@ async function setFunboxBodyClasses(): Promise<boolean> {
214214
(name) => "fb-" + name.replaceAll("_", "-")
215215
);
216216

217-
const currentClasses = $body?.attr("class")?.split(/\s+/) ?? [];
217+
const currentClasses =
218+
$body
219+
?.attr("class")
220+
?.split(/\s+/)
221+
.filter((it) => !it.startsWith("fb-")) ?? [];
218222

219223
if (
220224
getActiveFunboxes().some((it) =>

0 commit comments

Comments
 (0)