When observing a key path, compare its new & old values structurally

This commit is contained in:
Nathan Sobo
2012-12-17 19:00:47 -07:00
parent a7d1a29748
commit b82fe25b99
2 changed files with 6 additions and 2 deletions

View File

@@ -83,7 +83,7 @@ class Config
previousValue = _.clone(value)
updateCallback = =>
value = @get(keyPath)
unless value == previousValue
unless _.isEqual(value, previousValue)
previousValue = _.clone(value)
callback(value)