mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-23 00:13:35 +01:00
Etemplate: Avoid error if file_data.mime is false for some reason
(file missing)
This commit is contained in:
parent
63a320ca35
commit
510a6419c5
@ -947,7 +947,7 @@ var et2_vfsUpload = /** @class */ (function (_super) {
|
|||||||
if (file_data && (typeof file_data.download_url != 'undefined')) {
|
if (file_data && (typeof file_data.download_url != 'undefined')) {
|
||||||
var fe_mime = egw_get_file_editor_prefered_mimes(file_data.mime);
|
var fe_mime = egw_get_file_editor_prefered_mimes(file_data.mime);
|
||||||
// Check if the link entry is mime with media type, in order to open it in expose view
|
// Check if the link entry is mime with media type, in order to open it in expose view
|
||||||
if (typeof file_data.mime != 'undefined' &&
|
if (typeof file_data.mime === 'string' &&
|
||||||
(file_data.mime.match(mime.mime_regexp, 'ig') || (fe_mime && fe_mime.mime[file_data.mime]))) {
|
(file_data.mime.match(mime.mime_regexp, 'ig') || (fe_mime && fe_mime.mime[file_data.mime]))) {
|
||||||
vfs_attrs.onclick = function (ev) {
|
vfs_attrs.onclick = function (ev) {
|
||||||
ev.stopPropagation();
|
ev.stopPropagation();
|
||||||
|
@ -1092,7 +1092,7 @@ class et2_vfsUpload extends et2_file
|
|||||||
{
|
{
|
||||||
var fe_mime = egw_get_file_editor_prefered_mimes(file_data.mime);
|
var fe_mime = egw_get_file_editor_prefered_mimes(file_data.mime);
|
||||||
// Check if the link entry is mime with media type, in order to open it in expose view
|
// Check if the link entry is mime with media type, in order to open it in expose view
|
||||||
if (typeof file_data.mime != 'undefined' &&
|
if (typeof file_data.mime === 'string' &&
|
||||||
(file_data.mime.match(mime.mime_regexp,'ig') || (fe_mime && fe_mime.mime[file_data.mime])))
|
(file_data.mime.match(mime.mime_regexp,'ig') || (fe_mime && fe_mime.mime[file_data.mime])))
|
||||||
{
|
{
|
||||||
vfs_attrs.onclick = function(ev) {
|
vfs_attrs.onclick = function(ev) {
|
||||||
|
Loading…
Reference in New Issue
Block a user