Skip to content

Commit

Permalink
v2.50
Browse files Browse the repository at this point in the history
  • Loading branch information
erosman authored Mar 28, 2022
1 parent ae7838e commit b7fdcdf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion content/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit b7fdcdf

Please sign in to comment.