mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-23 08:56:17 -04:00
collab_client: Replace valuesArray()
function with Object.values()
This commit is contained in:
parent
0c95f2e65e
commit
f564e72792
1 changed files with 1 additions and 9 deletions
|
@ -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(
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue