diff --git a/suite/common/contentAreaUtils.js b/suite/common/contentAreaUtils.js index c3ca929e45fa..eeec397c338c 100644 --- a/suite/common/contentAreaUtils.js +++ b/suite/common/contentAreaUtils.js @@ -720,10 +720,12 @@ function getMIMETypeForURI(aURI) function getMIMEInfoForType(aMIMEType, aExtension) { - try { - return getMIMEService().getFromTypeAndExtension(aMIMEType, aExtension); - } - catch (e) { + if (aMIMEType || aExtension) { + try { + return getMIMEService().getFromTypeAndExtension(aMIMEType, aExtension); + } + catch (e) { + } } return null; }