mirror of
https://github.com/zotero/zotero.git
synced 2026-09-28 01:31:40 +00:00
Fix sync error if item with no content type somehow was indexed
https://forums.zotero.org/discussion/68954/mimetype-is-undefined-error Not sure how this could happen.
This commit is contained in:
parent
d45a9c22c5
commit
8241149079
1 changed files with 2 additions and 2 deletions
|
|
@ -849,7 +849,7 @@ Zotero.Fulltext = Zotero.FullText = new function(){
|
|||
let item = yield Zotero.Items.getAsync(itemID);
|
||||
let libraryKey = item.libraryKey;
|
||||
let contentType = item.attachmentContentType;
|
||||
if (isCachedMIMEType(contentType) || Zotero.MIME.isTextType(contentType)) {
|
||||
if (contentType && (isCachedMIMEType(contentType) || Zotero.MIME.isTextType(contentType))) {
|
||||
try {
|
||||
let cacheFile = this.getItemCacheFile(item).path;
|
||||
if (yield OS.File.exists(cacheFile)) {
|
||||
|
|
@ -904,7 +904,7 @@ Zotero.Fulltext = Zotero.FullText = new function(){
|
|||
}
|
||||
else {
|
||||
Zotero.debug("Skipping non-text file getting full-text content for item "
|
||||
+ libraryKey, 2);
|
||||
+ `${libraryKey} (contentType: ${contentType})`, 2);
|
||||
|
||||
// Delete rows for items that weren't supposed to be indexed
|
||||
yield Zotero.DB.executeTransaction(function* () {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue