From f564e727929c454bac7af2d7da590e4a9c04426e Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Thu, 1 Apr 2021 02:05:45 -0400 Subject: [PATCH] collab_client: Replace `valuesArray()` function with `Object.values()` --- src/static/js/collab_client.js | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/static/js/collab_client.js b/src/static/js/collab_client.js index 3be119302..bb93b60a4 100644 --- a/src/static/js/collab_client.js +++ b/src/static/js/collab_client.js @@ -360,7 +360,7 @@ const getCollabClient = (ace2editor, serverVars, initialUserInfo, _pad) => { tellAceAuthorInfo(userInfo.userId, userInfo.colorId, true); }; - const getConnectedUsers = () => valuesArray(userSet); + const getConnectedUsers = () => Object.values(userSet); const tellAceAboutHistoricalAuthors = (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) => { await sendMessage( {