summaryrefslogtreecommitdiff
path: root/lib/realtime.js
diff options
context:
space:
mode:
authorYukai Huang2016-10-12 18:19:08 +0800
committerYukai Huang2016-10-12 18:19:08 +0800
commit2f11706dd256502d3ad5912fce777bc19b92b609 (patch)
treee974cc6912603889da66d34b28f995b12d6a94fb /lib/realtime.js
parentae3d142d9c36095b17f3468a44d28ad6f15ccbdd (diff)
parentc98d2639286344188f50045ab2e28a157df7ddf7 (diff)
Merge branch 'master' into webpack-frontend
Diffstat (limited to '')
-rw-r--r--lib/realtime.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/realtime.js b/lib/realtime.js
index ea3735a6..d069a486 100644
--- a/lib/realtime.js
+++ b/lib/realtime.js
@@ -396,7 +396,7 @@ function finishConnection(socket, note, user) {
// update user note history
setTimeout(function () {
var noteId = note.alias ? note.alias : LZString.compressToBase64(note.id);
- history.updateHistory(user.userid, noteId, note.server.document);
+ if (note.server) history.updateHistory(user.userid, noteId, note.server.document);
}, 0);
emitOnlineUsers(socket);
@@ -669,7 +669,7 @@ function operationCallback(socket, operation) {
// update user note history
setTimeout(function() {
var noteId = note.alias ? note.alias : LZString.compressToBase64(note.id);
- history.updateHistory(userId, noteId, note.server.document);
+ if (note.server) history.updateHistory(userId, noteId, note.server.document);
}, 0);
}