diff --git a/src/static/js/collab_client.js b/src/static/js/collab_client.js index e507d6b06..4d010af16 100644 --- a/src/static/js/collab_client.js +++ b/src/static/js/collab_client.js @@ -357,10 +357,9 @@ const getCollabClient = (ace2editor, serverVars, initialUserInfo, options, _pad) }; const setChannelState = (newChannelState, moreInfo) => { - if (newChannelState !== channelState) { - channelState = newChannelState; - callbacks.onChannelStateChange(channelState, moreInfo); - } + if (newChannelState === channelState) return; + channelState = newChannelState; + callbacks.onChannelStateChange(channelState, moreInfo); }; const valuesArray = (obj) => {