From b7fdcdfb59bc74dc6bacb0c8f564f33d23431fb9 Mon Sep 17 00:00:00 2001 From: erosman Date: Mon, 28 Mar 2022 15:11:04 +0430 Subject: [PATCH] v2.50 --- content/options.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/options.js b/content/options.js index a095953..bb4fd72 100644 --- a/content/options.js +++ b/content/options.js @@ -225,7 +225,7 @@ class Script { } addTheme(dark) { - [0, 1].forEach(i => window.frames[i]?.document.body.classList.toggle('dark', dark)); + [0, 1].forEach(i => window.frames[i]?.document?.body?.classList.toggle('dark', dark)); const url = `../lib/codemirror/theme/${this.theme}.css`; if (this.theme === 'default' || document.querySelector(`link[href="${url}"]`)) { // already added document.body.classList.toggle('dark', dark);