diff --git a/api/js/etemplate/et2_extension_nextmatch.js b/api/js/etemplate/et2_extension_nextmatch.js index 0255af8572..54de78713e 100644 --- a/api/js/etemplate/et2_extension_nextmatch.js +++ b/api/js/etemplate/et2_extension_nextmatch.js @@ -1866,10 +1866,11 @@ var et2_nextmatch = /** @class */ (function (_super) { * @param {object} target */ et2_nextmatch.prototype.handle_drop = function (event, target) { + var _a; // Check to see if we can handle the link // First, find the UID var row = this.controller.getRowByNode(target); - var uid = row.uid || null; + var uid = ((_a = row) === null || _a === void 0 ? void 0 : _a.uid) || null; // Get the file information var files = []; if (event.originalEvent && event.originalEvent.dataTransfer && diff --git a/api/js/etemplate/et2_extension_nextmatch.ts b/api/js/etemplate/et2_extension_nextmatch.ts index f8842441e7..4c22fba8bd 100644 --- a/api/js/etemplate/et2_extension_nextmatch.ts +++ b/api/js/etemplate/et2_extension_nextmatch.ts @@ -2518,7 +2518,7 @@ export class et2_nextmatch extends et2_DOMWidget implements et2_IResizeable, et2 // Check to see if we can handle the link // First, find the UID const row = this.controller.getRowByNode(target); - const uid = row.uid || null; + const uid = row?.uid || null; // Get the file information let files = []; diff --git a/filemanager/js/app.js b/filemanager/js/app.js index b07de04bad..93fc0f464c 100644 --- a/filemanager/js/app.js +++ b/filemanager/js/app.js @@ -1068,12 +1068,13 @@ var filemanagerAPP = /** @class */ (function (_super) { * Needs to be a directory */ filemanagerAPP.prototype.hidden_upload_enabled = function (_action, _senders) { + var _a; if (_senders[0].id == 'nm') return false; var data = egw.dataGetUIDdata(_senders[0].id); - var readonly = (data.data.class || '').split(/ +/).indexOf('noEdit') >= 0; + var readonly = (((_a = data) === null || _a === void 0 ? void 0 : _a.data.class) || '').split(/ +/).indexOf('noEdit') >= 0; // symlinks dont have mime 'http/unix-directory', but server marks all directories with class 'isDir' - return (data.data.is_dir && !readonly); + return (!_senders[0].id || data.data.is_dir && !readonly); }; /** * View the link from an existing share diff --git a/filemanager/js/app.ts b/filemanager/js/app.ts index 7ac7d1d8de..577d65d211 100644 --- a/filemanager/js/app.ts +++ b/filemanager/js/app.ts @@ -1290,10 +1290,10 @@ export class filemanagerAPP extends EgwApp { if (_senders[0].id == 'nm') return false; let data = egw.dataGetUIDdata(_senders[0].id); - let readonly = (data.data.class || '').split(/ +/).indexOf('noEdit') >= 0; + let readonly = (data?.data.class || '').split(/ +/).indexOf('noEdit') >= 0; // symlinks dont have mime 'http/unix-directory', but server marks all directories with class 'isDir' - return (data.data.is_dir && !readonly); + return (!_senders[0].id || data.data.is_dir && !readonly); } /**