couchbase/couchbase-lite-ios

`valueWouldChange` does not check whether `newValue` is a `CBLDictionary`

blaugold opened this issue · 1 comments

Instead of checking whether newValue is either a CBLArray or a CBLDictionary the code checks whether it is a CBLArray twice. It does not cause wrong behavior, but partially circumvents the optimization of not comparing collections.

else if ([newValue isKindOfClass: [CBLArray class]]
|| [newValue isKindOfClass: [CBLArray class]])

pasin commented

Good catch!!. Thanks for reporting this.