mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-16 10:21:23 +01:00
Stop warnings from trying to set empty actions
This commit is contained in:
parent
49a706ec50
commit
e164e2bcb5
@ -539,6 +539,14 @@ const Et2WidgetMixin = <T extends Constructor>(superClass : T) =>
|
||||
@property({type: Object})
|
||||
set actions(actions : EgwAction[] | { [id : string] : object })
|
||||
{
|
||||
if(!(Array.isArray(actions) && actions.length > 0 || Object.entries(actions).length > 0))
|
||||
{
|
||||
// Not trying to clear actions, just called automatic
|
||||
if(!this._actionManager)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
if(this.id == "" || typeof this.id == "undefined")
|
||||
{
|
||||
this.egw().debug("warn", "Widget should have an ID if you want actions", this);
|
||||
|
Loading…
Reference in New Issue
Block a user