mirror of
https://github.com/romancm/gamebrary
synced 2024-11-15 07:57:19 +00:00
Restored old way of compiling game list
This commit is contained in:
parent
e5cb11850e
commit
db333dd85b
2 changed files with 22 additions and 2 deletions
|
@ -152,7 +152,17 @@ export default {
|
|||
|
||||
loadGameData() {
|
||||
if (this.list) {
|
||||
const gameList = this.list.map(({ games }) => games).filter(Boolean).join().replace(/(^,)|(,$)/g, '');
|
||||
const gameList = [];
|
||||
|
||||
this.list.forEach((list) => {
|
||||
if (list && list.games.length) {
|
||||
list.games.forEach((id) => {
|
||||
if (!gameList.includes(id)) {
|
||||
gameList.push(id);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
if (gameList.length > 0) {
|
||||
this.loading = true;
|
||||
|
|
|
@ -86,7 +86,17 @@ export default {
|
|||
},
|
||||
|
||||
loadGameData() {
|
||||
const gameList = this.listData.map(({ games }) => games).filter(Boolean).join().replace(/(^,)|(,$)/g, '');
|
||||
const gameList = [];
|
||||
|
||||
this.listData.forEach((list) => {
|
||||
if (list && list.games.length) {
|
||||
list.games.forEach((id) => {
|
||||
if (!gameList.includes(id)) {
|
||||
gameList.push(id);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
if (gameList.length > 0) {
|
||||
this.$store.dispatch('LOAD_PUBLIC_GAMES', gameList)
|
||||
|
|
Loading…
Reference in a new issue