diff options
| author | mrmr1993 | 2015-05-31 16:35:09 +0100 |
|---|---|---|
| committer | mrmr1993 | 2015-05-31 17:51:01 +0100 |
| commit | 0de6b076271b673d0e1dcc2b74b2ddd1646bf08e (patch) | |
| tree | c0e03c0c96ef2cc5057a983d142de579e5d7bf41 /lib/settings.coffee | |
| parent | 257a219fdfd33c49b565a93dff9d785824533d2a (diff) | |
| download | vimium-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.coffee | 2 |
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 |
