mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-23 10:07:19 +00:00
Fix problem with syncer not being initialised on server
This commit is contained in:
parent
3cce12e13f
commit
2a50277219
@ -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
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user