1
0
Эх сурвалжийг харах

Fix error when no theme is set and the auto theme is not supported

Jed Fox 5 жил өмнө
parent
commit
6832c1ccf6

+ 4 - 0
assets/javascripts/app/settings.coffee

@@ -46,6 +46,10 @@ class app.Settings
   get: (key) ->
     return @cache[key] if @cache.hasOwnProperty(key)
     @cache[key] = @store.get(key) ? @constructor.defaults[key]
+    if key == 'theme' and @cache[key] == 'auto' and !@darkModeQuery
+      @cache[key] = 'default'
+    else
+      @cache[key]
 
   set: (key, value) ->
     @store.set(key, value)