Skip to content
This repository has been archived by the owner on Oct 2, 2018. It is now read-only.

Commit

Permalink
Fix issue with autoload
Browse files Browse the repository at this point in the history
  • Loading branch information
ferndot committed Dec 11, 2015
1 parent 64904d7 commit 9819961
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions scripts/firetext.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,15 @@ firetext.init = function () {
// Wait until Dropbox is authenticated
if (lastDoc[3] == 'dropbox') {
if (firetext.settings.get('dropbox.enabled') == 'true') {
window.addEventListener('cloud.dropbox.authed', function() {
if (cloud.dropbox.client) {
loadToEditor(lastDoc[0], lastDoc[1], lastDoc[2], lastDoc[3]);
spinner('hide');
});
spinner('hide');
} else {
window.addEventListener('cloud.dropbox.authed', function() {
loadToEditor(lastDoc[0], lastDoc[1], lastDoc[2], lastDoc[3]);
spinner('hide');
});
}
} else {
spinner('hide');
}
Expand All @@ -77,12 +82,12 @@ firetext.init = function () {
spinner('hide');
}
} else {
regions.nav('welcome');
spinner('hide');
}
} else {
regions.nav('welcome');
} else {
spinner('hide');
regions.nav('welcome');
}

// Create listeners
Expand Down

0 comments on commit 9819961

Please sign in to comment.