File tree Expand file tree Collapse file tree
apps/codebattle/assets/js/widgets/middlewares Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments