summaryrefslogtreecommitdiff
path: root/js/AppBase.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/AppBase.js')
-rw-r--r--js/AppBase.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/js/AppBase.js b/js/AppBase.js
index db524296c..a348c95f8 100644
--- a/js/AppBase.js
+++ b/js/AppBase.js
@@ -34,9 +34,11 @@ define(["dojo/_base/declare"], function (declare) {
if (window.matchMedia) {
const mql = window.matchMedia('(prefers-color-scheme: dark)');
- mql.addEventListener("change", () => {
- this.nightModeChanged(mql.matches);
- });
+ try {
+ mql.addEventListener("change", () => {
+ this.nightModeChanged(mql.matches);
+ });
+ } catch (e) {}
this.nightModeChanged(mql.matches);
}