Skip to content

Commit

Permalink
Only call isReady() for sync adaptors that support it
Browse files Browse the repository at this point in the history
Fixes #2522
  • Loading branch information
Jermolene committed Aug 6, 2016
1 parent 08cfa88 commit 7326a3a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/modules/syncer.js
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ Process the task queue, performing the next task if appropriate
Syncer.prototype.processTaskQueue = function() {
var self = this;
// 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) {
if((!this.syncadaptor.isReady || this.syncadaptor.isReady()) && this.numTasksInProgress() === 0) {
// Choose the next task to perform
var task = this.chooseNextTask();
// Perform the task if we had one
Expand Down

0 comments on commit 7326a3a

Please sign in to comment.