From a39917dd45838b8e6d78f28b61d46478e428aa21 Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Sat, 26 Apr 2025 21:12:38 +0200 Subject: Fix: do not add emtpy IP peers --- pkg/ui/views/game_api.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'pkg/ui/views/game_api.go') diff --git a/pkg/ui/views/game_api.go b/pkg/ui/views/game_api.go index f39a771..66b63c1 100644 --- a/pkg/ui/views/game_api.go +++ b/pkg/ui/views/game_api.go @@ -18,8 +18,11 @@ func (m GameModel) handleDatabaseGameMsg(msg database.Game) (GameModel, tea.Cmd) peers := map[int]string{ 1: m.game.IP1, 2: m.game.IP2, - 3: m.game.IP3, - 4: m.game.IP4, + } + + if m.game.Type == database.PairGameType { + peers[3] = m.game.IP3 + peers[4] = m.game.IP4 } myPlayerNum := -1 -- cgit v1.2.3-18-g5258