mirror of
https://github.com/romancm/gamebrary
synced 2024-11-28 06:00:22 +00:00
Fix for 3ds result dupes (#119)
This commit is contained in:
parent
add25c1a16
commit
f46e60d661
1 changed files with 6 additions and 2 deletions
|
@ -58,8 +58,12 @@ export default {
|
|||
...response.data,
|
||||
];
|
||||
|
||||
commit('SET_SEARCH_RESULTS', joinedData);
|
||||
commit('CACHE_GAME_DATA', joinedData);
|
||||
const ids = [...new Set(joinedData.map(({ id }) => id))];
|
||||
|
||||
const unique = ids.map(e => joinedData.find(({ id }) => id === e));
|
||||
|
||||
commit('SET_SEARCH_RESULTS', unique);
|
||||
commit('CACHE_GAME_DATA', unique);
|
||||
resolve();
|
||||
}).catch(reject);
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue