From ccc4dccffde269d8f49011baa82f981bbd258652 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Tue, 11 Jun 2019 06:46:09 -0400 Subject: [PATCH] Fix error copying attachment without path to another library --- chrome/content/zotero/xpcom/data/item.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/data/item.js b/chrome/content/zotero/xpcom/data/item.js index dd946475e9..0a3e027112 100644 --- a/chrome/content/zotero/xpcom/data/item.js +++ b/chrome/content/zotero/xpcom/data/item.js @@ -2905,7 +2905,7 @@ Zotero.defineProperty(Zotero.Item.prototype, 'attachmentPath', { } else if (linkMode == Zotero.Attachments.LINK_MODE_IMPORTED_URL || linkMode == Zotero.Attachments.LINK_MODE_IMPORTED_FILE) { - if (!val.startsWith('storage:')) { + if (val && !val.startsWith('storage:')) { let storagePath = Zotero.Attachments.getStorageDirectory(this).path; if (!val.startsWith(storagePath)) { throw new Error("Imported file path must be within storage directory");