From 50277cb0ae925e545d066b42d303d4c96b3ccf2f Mon Sep 17 00:00:00 2001 From: ansuz Date: Thu, 13 Apr 2017 19:46:38 +0200 Subject: [PATCH] don't rely on 'info' in onRemote so we can call it anywhere --- www/code/main.js | 2 +- www/pad/main.js | 6 +++--- www/slide/main.js | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/www/code/main.js b/www/code/main.js index fe999c6c0..2b6553cf0 100644 --- a/www/code/main.js +++ b/www/code/main.js @@ -646,7 +646,7 @@ define([ return cursor; }; - var onRemote = config.onRemote = function (info) { + var onRemote = config.onRemote = function () { if (initializing) { return; } var scroll = editor.getScrollInfo(); diff --git a/www/pad/main.js b/www/pad/main.js index 4d9cd0244..443463b1d 100644 --- a/www/pad/main.js +++ b/www/pad/main.js @@ -475,12 +475,12 @@ define([ } }; - var onRemote = realtimeOptions.onRemote = function (info) { + var onRemote = realtimeOptions.onRemote = function () { if (initializing) { return; } var oldShjson = stringifyDOM(inner); - var shjson = info.realtime.getUserDoc(); + var shjson = module.realtime.getUserDoc(); // remember where the cursor is cursor.update(); @@ -679,7 +679,7 @@ define([ module.users = info.userList.users; module.realtime = info.realtime; - var shjson = info.realtime.getUserDoc(); + var shjson = module.realtime.getUserDoc(); var newPad = false; if (shjson === '') { newPad = true; } diff --git a/www/slide/main.js b/www/slide/main.js index 995d8b767..5654f43ab 100644 --- a/www/slide/main.js +++ b/www/slide/main.js @@ -840,7 +840,7 @@ define([ return cursor; }; - var onRemote = config.onRemote = function (info) { + var onRemote = config.onRemote = function () { if (initializing) { return; } var scroll = editor.getScrollInfo();