Bug #217405 --> New helper app dialog causes JS exception for unknown content types

r=ben
This commit is contained in:
scott%scott-macgregor.org 2003-08-27 04:45:36 +00:00
Родитель 94c4eaac54
Коммит 786efddbcf
1 изменённых файлов: 10 добавлений и 3 удалений

Просмотреть файл

@ -377,9 +377,16 @@ nsUnknownContentTypeDialog.prototype = {
var typeString = mimeInfo.Description;
if (typeString == "") {
// 2. If there is none, use the extension to identify the file, e.g. "ZIP file"
if (mimeInfo.primaryExtension != "")
typeString = mimeInfo.primaryExtension.toUpperCase() + " file";
// 2. If there is none, use the extension to identify the file, e.g. "ZIP file"
var primaryExtension = "";
try {
primaryExtension = mimeInfo.primaryExtension;
}
catch (ex) {
}
if (primaryExtension != "")
typeString = primaryExtension.toUpperCase() + " file";
// 3. If we can't even do that, just give up and show the MIME type.
else
typeString = mimeInfo.MIMEType;