1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-10-29 14:47:40 +00:00

Don't use syncadaptors until they are ready

Fixes #2453
This commit is contained in:
Jermolene
2016-07-05 11:29:59 +01:00
parent ff57b4084a
commit c3d18364c1
3 changed files with 13 additions and 2 deletions

View File

@@ -403,8 +403,8 @@ Process the task queue, performing the next task if appropriate
*/
Syncer.prototype.processTaskQueue = function() {
var self = this;
// Only process a task if we're not already performing a task. If we are already performing a task then we'll dispatch the next one when it completes
if(this.numTasksInProgress() === 0) {
// Only process a task if the sync adaptor is fully initialised and we're not already performing a task. If we are already performing a task then we'll dispatch the next one when it completes
if(this.syncadaptor.isReady() && this.numTasksInProgress() === 0) {
// Choose the next task to perform
var task = this.chooseNextTask();
// Perform the task if we had one