Comments in Collection#_onUpdate().
This commit is contained in:
parent
de6cbb0f45
commit
aebd9319f5
@ -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] ||
|
||||
|
Loading…
Reference in New Issue
Block a user