Fix error if file has no MIME type in indexFile() (fixes startup error reported in forums)

This commit is contained in:
Dan Stillman 2007-01-10 11:03:00 +00:00
parent dd4ab35dc4
commit 6fbebfae28

View File

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