Closes #114 fix crash on item addition
This commit is contained in:
parent
7b847b9a05
commit
f409d15de9
1 changed files with 3 additions and 1 deletions
|
@ -46,7 +46,9 @@ export const SubcribeItemEvents = () => {
|
|||
return prev;
|
||||
}, {});
|
||||
const result = prevList.map((item, index) => {
|
||||
return itemsMap[itemIds[index]];
|
||||
// Fix #114 crash when pushing new item and receive update list order
|
||||
// If item id doesn't exists in map, we keep the current item
|
||||
return itemsMap[itemIds[index]] || item;
|
||||
});
|
||||
return result;
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue