Skip to content
Snippets Groups Projects
Unverified Commit 151e2202 authored by Christoph Wurst's avatar Christoph Wurst
Browse files

Fix background sync if no account has been configured yet

parent d4b05983
No related branches found
No related tags found
No related merge requests found
......@@ -37,7 +37,10 @@ define(function(require) {
function triggerNextSync() {
_timer = setTimeout(function() {
var account;
if (require('state').accounts.length === 1) {
if (require('state').accounts.length === 0) {
// Nothing to do right now, just re-trigger the sync event
triggerNextSync();
} else if (require('state').accounts.length === 1) {
account = _accounts.first();
} else {
account = _accounts.get(-1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment