From c41f754138914f5f256025dae8fcebfee40bd229 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Wed, 29 Sep 2010 04:09:08 +0000 Subject: [PATCH] Don't throw an error trying to index an unindexable text file (e.g., text/xml) --- chrome/content/zotero/xpcom/fulltext.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/xpcom/fulltext.js b/chrome/content/zotero/xpcom/fulltext.js index cf742a1d9d..70ad0d6e5e 100644 --- a/chrome/content/zotero/xpcom/fulltext.js +++ b/chrome/content/zotero/xpcom/fulltext.js @@ -297,8 +297,8 @@ Zotero.Fulltext = new function(){ Zotero.debug("Indexing document '" + document.title + "'"); - if (document.contentType.indexOf('text/') !== 0) { - Zotero.debug('File is not text in indexDocument()', 2); + if (!document.body) { + Zotero.debug("Cannot index " + document.contentType + " file in indexDocument()", 2); return false; }