diff options
author | Santo Cariotti <santo@dcariotti.me> | 2025-04-22 08:50:56 +0200 |
---|---|---|
committer | Santo Cariotti <santo@dcariotti.me> | 2025-04-22 08:50:56 +0200 |
commit | feb193eb5322e2ad30cd810bb5f2033872930995 (patch) | |
tree | ca1ae486f04b72dd995efab68ea71a3c168e12bd | |
parent | 11bc78ba09ea8dfe558e77c33dd4d9835a5f1002 (diff) |
fix: do not show the game view if player2 is nil
-rw-r--r-- | pkg/ui/views/game.go | 2 |
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..." } |