Fix problem with syncer not being initialised on server

This commit is contained in:
Jermolene
2014-05-05 14:44:32 +01:00
parent 3cce12e13f
commit 2a50277219
2 changed files with 2 additions and 2 deletions
+2
View File
@@ -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
-2
View File
@@ -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();