Fix clicking on a link to app entry (not file) threw JS error instead of opening

This commit is contained in:
nathangray 2021-03-22 11:18:16 -06:00
parent 534c188d25
commit 93adb0dca5
2 changed files with 3 additions and 2 deletions

View File

@ -24,6 +24,7 @@ var __extends = (this && this.__extends) || (function () {
})();
var _a;
Object.defineProperty(exports, "__esModule", { value: true });
exports.et2_link_add = exports.et2_link_list = exports.et2_link_string = exports.et2_link = exports.et2_link_entry = exports.et2_link_apps = exports.et2_link_to = void 0;
/*egw:uses
/vendor/bower-asset/jquery/dist/jquery.js;
/vendor/bower-asset/jquery-ui/jquery-ui.js;
@ -1358,7 +1359,7 @@ var et2_link_string = /** @class */ (function (_super) {
&& _link_data.type.match(self.mime_regexp, 'ig') && !_link_data.type.match(self.mime_audio_regexp, 'ig')) {
self._init_blueimp_gallery(e, _link_data);
}
else if (_link_data.type.match(self.mime_audio_regexp, 'ig')) {
else if (_link_data.type && _link_data.type.match(self.mime_audio_regexp, 'ig')) {
self._audio_player(_link_data);
}
else if (typeof _link_data.type != 'undefined' && fe && fe.mime && fe.mime[_link_data.type]) {

View File

@ -1676,7 +1676,7 @@ export class et2_link_string extends expose(class et2_link_string extends et2_va
{
self._init_blueimp_gallery(e, _link_data);
}
else if(_link_data.type.match(self.mime_audio_regexp,'ig'))
else if(_link_data.type && _link_data.type.match(self.mime_audio_regexp,'ig'))
{
self._audio_player(_link_data);
}