Global Search: Fix broken layout due to duplicated search results
This commit is contained in:
parent
e2ef98db09
commit
e839c04f77
@ -54,7 +54,9 @@ export function updateGlobalSearchResults<T extends GlobalState>(
|
||||
}
|
||||
|
||||
const prevFoundIds = foundIdsForType || [];
|
||||
const newFoundIds = newFoundMessages.map((message) => getComplexKey(message));
|
||||
const newFoundIds = newFoundMessages
|
||||
.map((message) => getComplexKey(message))
|
||||
.filter((id) => !prevFoundIds.includes(id));
|
||||
const foundIds = Array.prototype.concat(prevFoundIds, newFoundIds);
|
||||
const foundOrPrevFoundIds = areSortedArraysEqual(prevFoundIds, foundIds) ? prevFoundIds : foundIds;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user