Skip to content

Commit e11a86a

Browse files
author
Stephen Blott
committed
Fix long-standing bug in sync.coffee.
This is wrong: if not key of Settings.defaults It parses as: if (not key) of Settings.defaults and is always false, so we never return here!
1 parent 0bf605a commit e11a86a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

background_scripts/sync.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ root.Sync = Sync =
4242

4343
# Only ever called from asynchronous synced-storage callbacks (fetchAsync and handleStorageUpdate).
4444
storeAndPropagate: (key, value) ->
45-
return if not key of Settings.defaults
45+
return unless key of Settings.defaults
4646
return if not @shouldSyncKey key
4747
return if value and key of localStorage and localStorage[key] is value
4848
defaultValue = Settings.defaults[key]

0 commit comments

Comments
 (0)