Skip to content

Commit 4e9d3a4

Browse files
committed
fixes
1 parent 17cf133 commit 4e9d3a4

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

apps/codebattle/assets/js/widgets/middlewares/GroupTournament.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,7 @@ export const connectToTournament = (currentUserId) => (dispatch) => {
119119
channel.join().receive("ok", onJoinSuccess).receive("error", onJoinFailure);
120120

121121
const handleRunUpdated = (response) => {
122-
// The tournament-wide topic fans out every player's per-row broadcast to
123-
// every connected client. Each row's `userId` is the row's owning user,
124-
// so only the broadcast addressed to the current user belongs in their
125-
// local panel — `playerIds` is the same array for every row in a slice
126-
// and would otherwise let one slice's six broadcasts add six runs here.
127-
if (currentUserId != null && response.userId !== currentUserId) {
122+
if (currentUserId == null || response.userId !== currentUserId) {
128123
return;
129124
}
130125

0 commit comments

Comments
 (0)