diff --git a/src/pages/GameBoard/GameBoard.vue b/src/pages/GameBoard/GameBoard.vue index 063dde1b..3484e75f 100755 --- a/src/pages/GameBoard/GameBoard.vue +++ b/src/pages/GameBoard/GameBoard.vue @@ -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; diff --git a/src/pages/ShareList/ShareList.vue b/src/pages/ShareList/ShareList.vue index b6363475..4c8bc793 100644 --- a/src/pages/ShareList/ShareList.vue +++ b/src/pages/ShareList/ShareList.vue @@ -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)