From a6eb03f1fdfc826c69f0e1a28d62715878afad44 Mon Sep 17 00:00:00 2001 From: nathangray Date: Wed, 18 Jul 2018 12:24:06 -0600 Subject: [PATCH] Check that file mime is there before trying to match on it to avoid error if it's false --- api/js/etemplate/et2_widget_vfs.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/js/etemplate/et2_widget_vfs.js b/api/js/etemplate/et2_widget_vfs.js index be6f7bf1dc..23cb87ab2c 100644 --- a/api/js/etemplate/et2_widget_vfs.js +++ b/api/js/etemplate/et2_widget_vfs.js @@ -393,7 +393,7 @@ var et2_vfsMime = (function(){ "use strict"; return expose(et2_valueWidget.exten } this.image.attr("src", src); // tooltip for mimetypes with available detailed thumbnail - if (_value.mime.match(/application\/vnd\.oasis\.opendocument\.(text|presentation|spreadsheet|chart)/)) + if (_value.mime && _value.mime.match(/application\/vnd\.oasis\.opendocument\.(text|presentation|spreadsheet|chart)/)) { var tooltip_target = this.image.parent().parent().parent().length > 0 ? // Nextmatch row @@ -1193,7 +1193,7 @@ var et2_vfsSelect = (function(){ "use strict"; return et2_inputWidget.extend( set_value: function(value) { this.value = value; }, - + getValue: function() { return this.value; }