summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChristoph (Sheogorath) Kern2018-01-16 16:28:14 +0700
committerGitHub2018-01-16 16:28:14 +0700
commit5f84906b2e5bac44379746b25ad2cf66bdee8dda (patch)
treebfc02782cf5ed296b4f3e2ff00c098ba21d58c4b /lib
parent4b419f4877a90717d3d639532b6316f8197dc28a (diff)
parent68879d20ed7a6dec8872f080ce229ec2540c9720 (diff)
Merge pull request #677 from hackmdio/realtime-minor-typos
Fix minor typos in realtime
Diffstat (limited to 'lib')
-rw-r--r--lib/realtime.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/realtime.js b/lib/realtime.js
index 361bbf09..e03e2d0b 100644
--- a/lib/realtime.js
+++ b/lib/realtime.js
@@ -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
}
})