summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSanto Cariotti <santo@dcariotti.me>2025-04-22 08:50:56 +0200
committerSanto Cariotti <santo@dcariotti.me>2025-04-22 08:50:56 +0200
commitfeb193eb5322e2ad30cd810bb5f2033872930995 (patch)
treeca1ae486f04b72dd995efab68ea71a3c168e12bd
parent11bc78ba09ea8dfe558e77c33dd4d9835a5f1002 (diff)
fix: do not show the game view if player2 is nil
-rw-r--r--pkg/ui/views/game.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/ui/views/game.go b/pkg/ui/views/game.go
index c09acee..afb81f5 100644
--- a/pkg/ui/views/game.go
+++ b/pkg/ui/views/game.go
@@ -157,7 +157,7 @@ func (m GameModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
func (m GameModel) View() string {
formWidth := getFormWidth(m.width)
- if m.game == nil {
+ if m.game == nil || m.game.Player2 == nil {
return "Loading game..."
}