diff --git a/chrome/content/zotero/xpcom/data/item.js b/chrome/content/zotero/xpcom/data/item.js index b917e23561..2790a64876 100644 --- a/chrome/content/zotero/xpcom/data/item.js +++ b/chrome/content/zotero/xpcom/data/item.js @@ -3208,16 +3208,16 @@ Zotero.defineProperty(Zotero.Item.prototype, 'attachmentReaderType', { if (!this.isFileAttachment()) { return undefined; } - switch (this.attachmentContentType) { - case 'application/pdf': - return 'pdf'; - case 'application/epub+zip': - return 'epub'; - case 'text/html': - return 'snapshot'; - default: - return undefined; + if (this.isPDFAttachment()) { + return 'pdf'; } + else if (this.isEPUBAttachment()) { + return 'epub'; + } + else if (this.isSnapshotAttachment()) { + return 'snapshot'; + } + return undefined; } });