Fix for 3ds result dupes (#119)

This commit is contained in:
Roman Cervantes 2019-05-22 11:17:56 -07:00 committed by GitHub
parent add25c1a16
commit f46e60d661
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 {