Fixed import documents when account is not linked to Google Drive. Fixes #299

This commit is contained in:
benweet 2014-02-02 19:24:29 +00:00
parent bde5c8672a
commit cab8a636f0

View File

@ -507,9 +507,14 @@ define([
$('#input-sync-export-' + providerId + '-realtime').change(function() {
$fileIdInputElt.prop('disabled', $realtimeCheckboxElt.prop('checked'));
});
// Skip gdrive action if provider is not enabled in the settings
if(accountIndex >= settings.gdriveMultiAccount) {
return;
}
var state = utils.retrieveIgnoreError(providerId + ".state");
if(state === undefined || state.userId != storage[accountId + '.userId']) {
var userId = storage[accountId + '.userId'];
if(state === undefined || (userId && state.userId != userId)) {
return;
}
storage.removeItem(providerId + ".state");