fix TypeError in _instanceof Et2Widget: _senders?.egw() returns also undefined, if _senders has no egw property

This commit is contained in:
ralf 2024-04-17 11:41:47 +02:00
parent 6f39a1144f
commit 92041df5bd

View File

@ -1248,7 +1248,7 @@ export class Et2Dialog extends Et2Widget(SlotMixin(SlDialog))
let button = _senders; let button = _senders;
let dialogMsg = (typeof _dialogMsg != "undefined") ? _dialogMsg : ''; let dialogMsg = (typeof _dialogMsg != "undefined") ? _dialogMsg : '';
let titleMsg = (typeof _titleMsg != "undefined") ? _titleMsg : ''; let titleMsg = (typeof _titleMsg != "undefined") ? _titleMsg : '';
let egw = _senders instanceof Et2Widget ? _senders.egw() : undefined; let egw = _senders?.egw();
let callbackDialog = function(button_id) let callbackDialog = function(button_id)
{ {
if(button_id == Et2Dialog.YES_BUTTON) if(button_id == Et2Dialog.YES_BUTTON)