Fix attachmentSyncedHash for embedded-image attachments

This commit is contained in:
Dan Stillman 2020-12-18 09:09:47 -05:00
parent f425b8d8d9
commit 0d4ad01201

View file

@ -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) {