From d44ab7efbb2f876d5f2e8e38c01fced9c0ca28a6 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Fri, 18 Dec 2020 08:59:49 -0500 Subject: [PATCH] Fix attachmentSyncedModificationTime 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 6cef4b2824..f5def20b30 100644 --- a/chrome/content/zotero/xpcom/data/item.js +++ b/chrome/content/zotero/xpcom/data/item.js @@ -3117,13 +3117,8 @@ Zotero.defineProperty(Zotero.Item.prototype, 'attachmentSyncedModificationTime', throw new Error("attachmentSyncedModificationTime 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("attachmentSyncedModificationTime can only be set for stored files"); + if (!this.isStoredFileAttachment()) { + throw new Error("attachmentSyncedModificationTime can only be set for stored files"); } if (typeof val != 'number') {