collab_client: Invert condition to improve readability

rhansen-collab_client
Richard Hansen 2021-03-30 16:48:50 -04:00
parent 03275ba227
commit 3f7745b48b
1 changed files with 3 additions and 4 deletions

View File

@ -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) => {