From 19290fd0c676c01a19cd972cb6397448496b9b65 Mon Sep 17 00:00:00 2001 From: Giulio Cesare Solaroli Date: Wed, 16 Dec 2015 12:53:37 +0100 Subject: [PATCH] Handled null condition --- frontend/delta/js/Clipperz/PM/DataModel/Attachment.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/delta/js/Clipperz/PM/DataModel/Attachment.js b/frontend/delta/js/Clipperz/PM/DataModel/Attachment.js index 12c379f..f3fdb56 100644 --- a/frontend/delta/js/Clipperz/PM/DataModel/Attachment.js +++ b/frontend/delta/js/Clipperz/PM/DataModel/Attachment.js @@ -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';