mirror of
https://github.com/romancm/gamebrary
synced 2024-11-30 23:09:14 +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