mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-12-24 19:03:40 +00:00
realtime.ts: Fix bug in emitOnlineUsers()
We incorrectly iterated over Map.keys() instead of Map.values() Signed-off-by: David Mehren <dmehren1@gmail.com>
This commit is contained in:
parent
cb0f5c1bed
commit
5c4820483c
1 changed files with 1 additions and 2 deletions
|
@ -349,8 +349,7 @@ function emitOnlineUsers (socket: SocketWithNoteId): void {
|
|||
const note = notes.get(noteId)
|
||||
if (!note) return
|
||||
const users: UserSession[] = []
|
||||
// Object.keys(note.users).forEach(function (key) {
|
||||
for (const user of note.users.keys()) {
|
||||
for (const user of note.users.values()) {
|
||||
if (user) {
|
||||
users.push(buildUserOutData(user))
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue