fix: guard against null deref
This commit is contained in:
parent
e08040897f
commit
a4e30c0424
6
src/client/store/effects.js
vendored
6
src/client/store/effects.js
vendored
|
@ -95,7 +95,11 @@ const effects = {
|
|||
},
|
||||
[submitJoin]: ({dispatch}, {payload}) => {
|
||||
const {channel} = payload;
|
||||
socket.send(new Join(payload), (error, {messages, users}) => {
|
||||
socket.send(new Join(payload), (error, result) => {
|
||||
if (error) {
|
||||
return;
|
||||
}
|
||||
const {messages, users} = result;
|
||||
dispatch(join({channel, messages, users}));
|
||||
});
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue
Block a user