From 2a50277219c14db30004553907fb6da346d7d165 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Mon, 5 May 2014 14:44:32 +0100 Subject: [PATCH] Fix problem with syncer not being initialised on server --- core/modules/startup.js | 2 ++ core/modules/startup/syncer-browser.js | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/modules/startup.js b/core/modules/startup.js index b4e9bd5a2..c0dc16db4 100755 --- a/core/modules/startup.js +++ b/core/modules/startup.js @@ -50,6 +50,8 @@ exports.startup = function() { }); // Clear outstanding tiddler store change events to avoid an unnecessary refresh cycle at startup $tw.wiki.clearTiddlerEventQueue(); + // Set up the syncer object + $tw.syncer = new $tw.Syncer({wiki: $tw.wiki}); // Host-specific startup if($tw.browser) { // Set up our beforeunload handler diff --git a/core/modules/startup/syncer-browser.js b/core/modules/startup/syncer-browser.js index c5b6d70c4..a79c5e631 100644 --- a/core/modules/startup/syncer-browser.js +++ b/core/modules/startup/syncer-browser.js @@ -19,8 +19,6 @@ exports.after = ["rootwidget"]; exports.synchronous = true; exports.startup = function() { - // Set up the syncer object - $tw.syncer = new $tw.Syncer({wiki: $tw.wiki}); // Listen out for login/logout/refresh events in the browser $tw.rootWidget.addEventListener("tw-login",function() { $tw.syncer.handleLoginEvent();