mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-19 01:35:18 -04: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)
|
const note = notes.get(noteId)
|
||||||
if (!note) return
|
if (!note) return
|
||||||
const users: UserSession[] = []
|
const users: UserSession[] = []
|
||||||
// Object.keys(note.users).forEach(function (key) {
|
for (const user of note.users.values()) {
|
||||||
for (const user of note.users.keys()) {
|
|
||||||
if (user) {
|
if (user) {
|
||||||
users.push(buildUserOutData(user))
|
users.push(buildUserOutData(user))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue