Skip to content

Conversation

@claygorman
Copy link
Contributor

Summary

  • Fix getUserOwnedGames() crashing when a user has no games
  • When the Steam API returns {"response": {"game_count": 0}} (without a games array), calling .map() on undefined throws an error
  • Added || [] fallback, consistent with how getUserRecentGames() already handles this case (line 614)

Test plan

  • Call getUserOwnedGames() on a Steam account with no owned games
  • Verify it returns an empty array instead of throwing

🤖 Generated with Claude Code

When a user has no games, the Steam API returns `{"response": {"game_count": 0}}`
without a `games` array. This causes `.map()` to throw when called on undefined.

This fix adds a fallback to an empty array, consistent with how
`getUserRecentGames` already handles the same scenario.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant