diff options
author | fox <[email protected]> | 2019-12-13 18:54:16 +0000 |
---|---|---|
committer | Gogs <[email protected]> | 2019-12-13 18:54:16 +0000 |
commit | e146a1ab3717ae8132fed886d7383b19b3d04e23 (patch) | |
tree | ae9f732e367f32fb8308c5a139418a7fd3846ad5 /js/AppBase.js | |
parent | 0237dee980157554ab2c9a79b6e9d10cec9e2f3a (diff) | |
parent | b4dd03ba2a2a38109afb242eb7b14b52f6e214ac (diff) |
Merge branch 'safari-mediaquerychange' of JustAMacUser/tt-rss into master
Diffstat (limited to 'js/AppBase.js')
-rw-r--r-- | js/AppBase.js | 8 |
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); } |