From 6fbebfae286cf90e91c625037130d2e90bb522be Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Wed, 10 Jan 2007 11:03:00 +0000 Subject: [PATCH] Fix error if file has no MIME type in indexFile() (fixes startup error reported in forums) --- chrome/content/zotero/xpcom/fulltext.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/fulltext.js b/chrome/content/zotero/xpcom/fulltext.js index edd25aee1a..5c63c76d69 100644 --- a/chrome/content/zotero/xpcom/fulltext.js +++ b/chrome/content/zotero/xpcom/fulltext.js @@ -182,7 +182,11 @@ Zotero.Fulltext = new function(){ } if (!itemID){ throw ('Item ID not provided to indexFile()'); } - if (!mimeType){ throw ('MIME type not provided to indexFile()'); } + + if (!mimeType) { + Zotero.debug("MIME type not provided in indexFile()", 1); + return false; + } if (mimeType.substr(0, 5)!='text/'){ Zotero.debug('File is not text in indexFile()', 2);