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

@ -508,8 +508,13 @@ define([
$fileIdInputElt.prop('disabled', $realtimeCheckboxElt.prop('checked')); $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"); 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; return;
} }
storage.removeItem(providerId + ".state"); storage.removeItem(providerId + ".state");