Skip to content

Commit

Permalink
log games, more fault-tolerant
Browse files Browse the repository at this point in the history
  • Loading branch information
konsumer committed Dec 29, 2022
1 parent 1a30b12 commit 6ac0249
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ function App () {
useEffect(() => {
gog.games()
.then(g => {
setCount(g.length)
console.log('GAMES', g)
setCount(g?.length || 0)
return Promise.all(g.map(id => gog.details(id)))
}).then(r => {
const n = r.filter(g => !g?.message && g?._embedded.productType === 'GAME')
Expand Down

0 comments on commit 6ac0249

Please sign in to comment.