From 2f3b8178a2f6e922b4acd15e047c08ec55d36018 Mon Sep 17 00:00:00 2001 From: Luke Harmon Date: Sun, 30 Apr 2023 19:19:00 -0700 Subject: [PATCH 1/2] Client updates for swiss tourneys --- js/client-chat-tournament.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/js/client-chat-tournament.js b/js/client-chat-tournament.js index 4a61398403..d382bf82ee 100644 --- a/js/client-chat-tournament.js +++ b/js/client-chat-tournament.js @@ -763,7 +763,10 @@ return; } $cell.addClass('tournament-bracket-table-cell-' + cell.state); - if (cell.state === 'unavailable') + console.log(cell.type); + if (cell.type === 'nameCell') { + $cell.text(cell.name); + } else if (cell.state === 'unavailable') $cell.text("Unavailable"); else if (cell.state === 'available') $cell.text("Waiting"); @@ -782,7 +785,9 @@ $cell.text(cell.score.join(" - ")); } }); - $row.append($('').text(data.scores[r])); + if (data.scores) { + $row.append($('').text(data.scores[r])); + } }); return $table; From b34b36c87eaf30132a7e6a936824a20886fe26f2 Mon Sep 17 00:00:00 2001 From: Luke Harmon Date: Sun, 30 Apr 2023 19:20:40 -0700 Subject: [PATCH 2/2] Remove logging --- js/client-chat-tournament.js | 1 - 1 file changed, 1 deletion(-) diff --git a/js/client-chat-tournament.js b/js/client-chat-tournament.js index d382bf82ee..21fc24b424 100644 --- a/js/client-chat-tournament.js +++ b/js/client-chat-tournament.js @@ -763,7 +763,6 @@ return; } $cell.addClass('tournament-bracket-table-cell-' + cell.state); - console.log(cell.type); if (cell.type === 'nameCell') { $cell.text(cell.name); } else if (cell.state === 'unavailable')