summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
Diffstat (limited to 'web')
-rw-r--r--web/react/utils/utils.jsx6
1 files changed, 4 insertions, 2 deletions
diff --git a/web/react/utils/utils.jsx b/web/react/utils/utils.jsx
index 9f80f1bb8..d2dd6cf38 100644
--- a/web/react/utils/utils.jsx
+++ b/web/react/utils/utils.jsx
@@ -696,8 +696,10 @@ export function applyTheme(theme) {
export function applyFont(fontName) {
const body = document.querySelector('body');
- body.classList.forEach((className) => {
- if (className.lastIndexOf('font') === 0) {
+ const keys = Object.getOwnPropertyNames(body.classList);
+ keys.forEach((k) => {
+ const className = body.classList[k];
+ if (className && className.lastIndexOf('font') === 0) {
body.classList.remove(className);
}
});