diff options
| author | mrmr1993 | 2015-06-01 14:18:54 +0100 | 
|---|---|---|
| committer | Stephen Blott | 2015-06-01 15:04:36 +0100 | 
| commit | a456de97daaf1361bc3ad7df775f1b6cbe1f720e (patch) | |
| tree | 10c66a5aaa018798b01b62c7c69a709adfcdaf18 /lib | |
| parent | 35c52143d82c8b2bc3e07832e8f6cdb089453baf (diff) | |
| download | vimium-a456de97daaf1361bc3ad7df775f1b6cbe1f720e.tar.bz2 | |
Use JSON.stringify to compare setting values everywhere
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/settings.coffee | 4 | 
1 files changed, 1 insertions, 3 deletions
| diff --git a/lib/settings.coffee b/lib/settings.coffee index 4fafa7d3..ca4e77b0 100644 --- a/lib/settings.coffee +++ b/lib/settings.coffee @@ -55,9 +55,7 @@ Settings =    set: (key, value) ->      # Don't store the value if it is equal to the default, so we can change the defaults in the future. -    # FIXME(smblott).  This test is broken for exclusionRules (for which it is never true).  In this case, we -    # need some kind of structural equality (or perhaps comparison of JSONified strings). -    if value == @defaults[key] +    if JSON.stringify(value) == JSON.stringify @defaults[key]        @clear key      else        jsonValue = JSON.stringify value | 
