aboutsummaryrefslogtreecommitdiffstats
path: root/lib/settings.coffee
diff options
context:
space:
mode:
authormrmr19932015-05-31 16:35:09 +0100
committermrmr19932015-05-31 17:51:01 +0100
commit0de6b076271b673d0e1dcc2b74b2ddd1646bf08e (patch)
treec0e03c0c96ef2cc5057a983d142de579e5d7bf41 /lib/settings.coffee
parent257a219fdfd33c49b565a93dff9d785824533d2a (diff)
downloadvimium-0de6b076271b673d0e1dcc2b74b2ddd1646bf08e.tar.bz2
Rewrite settings as a tight wrapper around Settings, tweaks for tests
Diffstat (limited to 'lib/settings.coffee')
-rw-r--r--lib/settings.coffee2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/settings.coffee b/lib/settings.coffee
index b5021225..88e3b883 100644
--- a/lib/settings.coffee
+++ b/lib/settings.coffee
@@ -81,7 +81,7 @@ root.Settings = Settings =
get: (key) ->
console.log "WARNING: Settings have not loaded yet; using the default value for #{key}." unless @isLoaded
- if (key of @cache) then JSON.parse(@cache[key]) else @defaults[key]
+ if key of @cache and @cache[key]? then JSON.parse(@cache[key]) else @defaults[key]
set: (key, value) ->
# Don't store the value if it is equal to the default, so we can change the defaults in the future