Skip invalid on-demand download attempt if not yet synced
This could happen if an account was set up for syncing but Zotero was pointed at a new DB and then you double-clicked on a missing attachment.
This commit is contained in:
parent
cfa77381a2
commit
eef25677bf
1 changed files with 6 additions and 0 deletions
|
@ -32,6 +32,12 @@ Zotero.Sync.Storage.Local = {
|
|||
},
|
||||
|
||||
getEnabledForLibrary: function (libraryID) {
|
||||
// The user must have synced for the first time before we allow storage requests.
|
||||
// This is relevant if an account is set up for syncing but the DB file is cleared and the
|
||||
// user double-clicks on a missing file in download-as-needed mode.
|
||||
if (!Zotero.Users.getCurrentUserID()) {
|
||||
return false;
|
||||
}
|
||||
var libraryType = Zotero.Libraries.get(libraryID).libraryType;
|
||||
switch (libraryType) {
|
||||
case 'user':
|
||||
|
|
Loading…
Reference in a new issue