mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-25 11:16:31 -05:00
Fix minor typos
of wrong parameters passing order and wrong user object indexing in for each function
This commit is contained in:
parent
4b419f4877
commit
68879d20ed
1 changed files with 3 additions and 3 deletions
|
@ -709,7 +709,7 @@ function connection (socket) {
|
|||
return failConnection(404, 'note id not found', socket)
|
||||
}
|
||||
|
||||
if (isDuplicatedInSocketQueue(socket, connectionSocketQueue)) return
|
||||
if (isDuplicatedInSocketQueue(connectionSocketQueue, socket)) return
|
||||
|
||||
// store noteId in this socket session
|
||||
socket.noteId = noteId
|
||||
|
@ -723,8 +723,8 @@ function connection (socket) {
|
|||
var maxrandomcount = 10
|
||||
var found = false
|
||||
do {
|
||||
Object.keys(notes[noteId].users).forEach(function (user) {
|
||||
if (user.color === color) {
|
||||
Object.keys(notes[noteId].users).forEach(function (userId) {
|
||||
if (notes[noteId].users[userId].color === color) {
|
||||
found = true
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue