@infinite-list/data-model
Advanced tools
Comparing version 0.2.27 to 0.2.28
{ | ||
"name": "@infinite-list/data-model", | ||
"version": "0.2.27", | ||
"version": "0.2.28", | ||
"files": [ | ||
@@ -5,0 +5,0 @@ "dist", |
@@ -678,2 +678,3 @@ import noop from '@x-oasis/noop'; | ||
const itemToKeyMap: Map<ItemT, string> = new Map(); | ||
let duplicateKeyCount = 0; | ||
// TODO: optimization | ||
@@ -684,3 +685,3 @@ const data = _data.filter((item, index) => { | ||
if (_index === -1) { | ||
keyToIndexMap.set(itemKey, index); | ||
keyToIndexMap.set(itemKey, index - duplicateKeyCount); | ||
keyToIndexArray.push(itemKey); | ||
@@ -690,2 +691,3 @@ itemToKeyMap.set(item, itemKey); | ||
} | ||
duplicateKeyCount += 1; | ||
@@ -692,0 +694,0 @@ return false; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
1663362
19851