Additional safeguard in Zotero.Attachments.getStorageDirectory()
This commit is contained in:
parent
b8599d0414
commit
ad14b44335
1 changed files with 3 additions and 0 deletions
|
@ -970,6 +970,9 @@ Zotero.Attachments = new function(){
|
|||
if (!item) {
|
||||
throw ("Item " + itemID + " not found in Zotero.Attachments.getStorageDirectory()");
|
||||
}
|
||||
if (!item.key) {
|
||||
throw ("No item key in Zotero.Attachments.getStorageDirectory()");
|
||||
}
|
||||
var dir = Zotero.getStorageDirectory();
|
||||
dir.append(item.key);
|
||||
return dir;
|
||||
|
|
Loading…
Add table
Reference in a new issue