collab_client: Invert condition to improve readability

This commit is contained in:
Richard Hansen 2021-03-30 16:48:50 -04:00
parent 03275ba227
commit 3f7745b48b

View file

@ -357,10 +357,9 @@ const getCollabClient = (ace2editor, serverVars, initialUserInfo, options, _pad)
};
const setChannelState = (newChannelState, moreInfo) => {
if (newChannelState !== channelState) {
if (newChannelState === channelState) return;
channelState = newChannelState;
callbacks.onChannelStateChange(channelState, moreInfo);
}
};
const valuesArray = (obj) => {