Skip to content

fix(ui): guard games.isEmpty in ConsoleModeView.move - #170

Open
amir-rezaei wants to merge 1 commit into
mont127:mainfrom
amir-rezaei:fix/console-mode-view-empty-games-move-guard
Open

fix(ui): guard games.isEmpty in ConsoleModeView.move#170
amir-rezaei wants to merge 1 commit into
mont127:mainfrom
amir-rezaei:fix/console-mode-view-empty-games-move-guard

Conversation

@amir-rezaei

Copy link
Copy Markdown

Description

This PR updates ConsoleModeView.move in Sources/ConsoleModeView.swift.

Details

  • Adds a guard !games.isEmpty check to prevent invalid index access when navigating in Big Picture console mode while a bottle has no reachable games.

@realmaitreal realmaitreal left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Straightforward guard against indexing into an empty games array before selected + delta is computed. Same class of "empty collection" concern as #158 was trying to address, but correctly implemented here. No issues.


Generated by Claude Code

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.

4 participants