History

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

Jed Fox committed 6 years ago

Commit 6832c1c1 parent 8de9e431 file · +4 −0Browse files

Unified · Split

assets/javascripts/app/settings.coffee+4−0
@@ -46,6 +46,10 @@ class app.Settings · 45 unmodified lines
4646 get: (key) ->
4747 return @cache[key] if @cache.hasOwnProperty(key)
4848 @cache[key] = @store.get(key) ? @constructor.defaults[key]
49+ if key == 'theme' and @cache[key] == 'auto' and !@darkModeQuery
50+ @cache[key] = 'default'
51+ else
52+ @cache[key]
4953
5054 set: (key, value) ->
5155 @store.set(key, value)