From 0d4ad01201cf6b8f0ec8911636357890dc9e7b6a Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Fri, 18 Dec 2020 09:09:47 -0500 Subject: [PATCH] Fix attachmentSyncedHash for embedded-image attachments --- chrome/content/zotero/xpcom/data/item.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/chrome/content/zotero/xpcom/data/item.js b/chrome/content/zotero/xpcom/data/item.js index f5def20b30..f74db64889 100644 --- a/chrome/content/zotero/xpcom/data/item.js +++ b/chrome/content/zotero/xpcom/data/item.js @@ -3159,13 +3159,8 @@ Zotero.defineProperty(Zotero.Item.prototype, 'attachmentSyncedHash', { throw ("attachmentSyncedHash can only be set for attachment items"); } - switch (this.attachmentLinkMode) { - case Zotero.Attachments.LINK_MODE_IMPORTED_URL: - case Zotero.Attachments.LINK_MODE_IMPORTED_FILE: - break; - - default: - throw new Error("attachmentSyncedHash can only be set for stored files"); + if (!this.isStoredFileAttachment()) { + throw new Error("attachmentSyncedHash can only be set for stored files"); } if (val !== null && val.length != 32) {