mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-25 01:13:25 +01:00
Avoid breaking error if validation error is for a widget that can't be found
This commit is contained in:
parent
0b29d723a4
commit
64ce874f62
@ -1710,10 +1710,15 @@ export class etemplate2
|
||||
(<et2_baseWidget>widget).showMessage(_response.data[id], 'validation_error');
|
||||
|
||||
}
|
||||
else if(typeof widget.set_validation_error == "function")
|
||||
else if(widget && typeof widget.set_validation_error == "function")
|
||||
{
|
||||
widget.set_validation_error(_response.data[id]);
|
||||
}
|
||||
else if(!widget)
|
||||
{
|
||||
console.warn(`Validation error without widget. ID:${id} - ${_response.data[id]}`);
|
||||
continue;
|
||||
}
|
||||
// Handle validation_error (messages coming back from server as a response) if widget is children of a tabbox
|
||||
let tmpWidget = widget;
|
||||
while(tmpWidget.getParent() && tmpWidget.getType() !== 'ET2-TABBOX')
|
||||
|
Loading…
Reference in New Issue
Block a user