Comments in Collection#_onUpdate().

This commit is contained in:
Julien Fontanet 2015-04-29 13:17:31 +02:00
parent de6cbb0f45
commit aebd9319f5

View File

@ -99,14 +99,14 @@ export default class Index {
const prev = keysToHash[key]
const hash = computeHash(value, key)
if (hash === prev) {
continue
}
if (prev != null) {
delete itemsByHash[prev][key]
}
// Same hash, nothing to do.
if (hash === prev) continue
// Removes item from the previous hash's list if any.
if (prev != null) delete itemsByHash[prev][key]
// Inserts item into the new hash's list if any.
if (hash != null) {
(
itemsByHash[hash] ||