commit 3e7995fee5e37f4590f02058f9f5245bf6680466
parent 91459f95f747aa6cfa06952d530d2d53751dab7f
Author: Dan Stillman <dstillman@zotero.org>
Date: Thu, 14 May 2009 18:39:35 +0000
Workaround for "mimeType is undefined" import error
Diffstat:
1 file changed, 5 insertions(+), 0 deletions(-)
diff --git a/chrome/content/zotero/xpcom/attachments.js b/chrome/content/zotero/xpcom/attachments.js
@@ -1196,6 +1196,11 @@ Zotero.Attachments = new function(){
* asynchronously after the fact
*/
function _postProcessFile(itemID, file, mimeType){
+ // Don't try to process if MIME type is unknown
+ if (!mimeType) {
+ return;
+ }
+
// MIME types that get cached by the fulltext indexer can just be
// indexed directly
if (Zotero.Fulltext.isCachedMIMEType(mimeType)) {