Handled null condition

master-GE
Giulio Cesare Solaroli 2015-12-16 12:53:37 +01:00
parent da74d23be6
commit 19290fd0c6
1 changed files with 4 additions and 2 deletions

View File

@ -355,8 +355,10 @@ Clipperz.PM.DataModel.Attachment.contentTypeIcon = function (aContentType) {
var result;
result = 'other file';
if (aContentType == "application/pdf") {
if (aContentType == null) {
result = 'other file';
} else if (aContentType == "application/pdf") {
result = 'pdf file';
} else if (aContentType.indexOf('image/') == 0) {
result = 'image file';