aboutsummaryrefslogtreecommitdiff
path: root/src/components/settings_modal/settings_modal.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/settings_modal/settings_modal.js')
-rw-r--r--src/components/settings_modal/settings_modal.js13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/components/settings_modal/settings_modal.js b/src/components/settings_modal/settings_modal.js
index b6880445..4f54d6a3 100644
--- a/src/components/settings_modal/settings_modal.js
+++ b/src/components/settings_modal/settings_modal.js
@@ -38,17 +38,14 @@ const SettingsModal = {
}
},
watch: {
+ // This is the only way to access the <html> element.
modalActivated (newValue) {
+ let html = document.querySelector('html')
+ if (!html) return
if (newValue) {
- let html = document.querySelector('html')
- if (html) {
- html.classList.add('settings-modal-layout')
- }
+ html.classList.add('settings-modal-layout')
} else {
- let html = document.querySelector('html')
- if (html) {
- html.classList.remove('settings-modal-layout')
- }
+ html.classList.remove('settings-modal-layout')
}
}
}