From 068ff09cfed6081ed794cf899830911f72c3e4fb Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Wed, 2 Sep 2015 19:22:46 +0200 Subject: fallback for isimage --- apps/files/js/fileinfomodel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apps/files/js') diff --git a/apps/files/js/fileinfomodel.js b/apps/files/js/fileinfomodel.js index 1c850239cdc..ab205b2efb4 100644 --- a/apps/files/js/fileinfomodel.js +++ b/apps/files/js/fileinfomodel.js @@ -58,7 +58,7 @@ * @return {boolean} true if this is an image, false otherwise */ isImage: function() { - return this.get('mimetype').substr(0, 6) === 'image/'; + return this.get('mimetype')? this.get('mimetype').substr(0, 6) === 'image/' : false; }, /** -- cgit v1.2.3