collab_client: Replace valuesArray() function with Object.values()

This commit is contained in:
Richard Hansen 2021-04-01 02:05:45 -04:00
parent 0c95f2e65e
commit f564e72792

View file

@ -360,7 +360,7 @@ const getCollabClient = (ace2editor, serverVars, initialUserInfo, _pad) => {
tellAceAuthorInfo(userInfo.userId, userInfo.colorId, true); tellAceAuthorInfo(userInfo.userId, userInfo.colorId, true);
}; };
const getConnectedUsers = () => valuesArray(userSet); const getConnectedUsers = () => Object.values(userSet);
const tellAceAboutHistoricalAuthors = (hadata) => { const tellAceAboutHistoricalAuthors = (hadata) => {
for (const [author, data] of Object.entries(hadata)) { for (const [author, data] of Object.entries(hadata)) {
@ -391,14 +391,6 @@ const getCollabClient = (ace2editor, serverVars, initialUserInfo, _pad) => {
} }
}; };
const valuesArray = (obj) => {
const array = [];
$.each(obj, (k, v) => {
array.push(v);
});
return array;
};
const sendClientMessage = async (msg) => { const sendClientMessage = async (msg) => {
await sendMessage( await sendMessage(
{ {