diff --git a/app/components/primer/open_project/zen_mode_button.ts b/app/components/primer/open_project/zen_mode_button.ts index 7dcaacdbc8..e306e2f1e2 100644 --- a/app/components/primer/open_project/zen_mode_button.ts +++ b/app/components/primer/open_project/zen_mode_button.ts @@ -9,7 +9,7 @@ class ZenModeButtonElement extends HTMLElement { private deactivateZenMode() { this.inZenMode = false this.button.classList.remove('zen-mode-button--active') - this.querySelector('body')?.classList.remove('zen-mode') + document.getElementsByTagName('body')[0].classList.remove('zen-mode') if (screenfull.isEnabled && screenfull.isFullscreen) { screenfull.exit() } @@ -17,7 +17,7 @@ class ZenModeButtonElement extends HTMLElement { private activateZenMode() { this.inZenMode = true - document.querySelector('body')?.classList.add('zen-mode') + document.getElementsByTagName('body')[0].classList.add('zen-mode') this.button.classList.add('zen-mode-button--active') if (screenfull.isEnabled) { screenfull.request()