mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-07 08:34:42 +01:00
Return null instead of resolved promise to avoid extra calls
This commit is contained in:
parent
c504de5def
commit
97a874342f
@ -3759,9 +3759,9 @@ export class CalendarApp extends EgwApp
|
||||
* in a particular calendar.
|
||||
*
|
||||
* @param event
|
||||
* @return Promise
|
||||
* @return Promise| null
|
||||
*/
|
||||
async _fetch_group_members(event) : Promise<any>
|
||||
async _fetch_group_members(event) : Promise<any> | null
|
||||
{
|
||||
let groups = [];
|
||||
let option_owner = null;
|
||||
@ -3801,7 +3801,7 @@ export class CalendarApp extends EgwApp
|
||||
}
|
||||
else
|
||||
{
|
||||
return Promise.resolve();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -384,7 +384,12 @@ export class et2_calendar_daycol extends et2_valueWidget implements et2_IDetache
|
||||
{
|
||||
continue;
|
||||
}
|
||||
waitForGroups.push(((<CalendarApp>this.getInstanceManager().app_obj.calendar)._fetch_group_members(event)).then(() =>
|
||||
let wait = (<CalendarApp>this.getInstanceManager().app_obj.calendar)._fetch_group_members(event);
|
||||
if(wait === null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
waitForGroups.push(wait.then(() =>
|
||||
{
|
||||
if(event && event.date && et2_calendar_event.owner_check(event, this) && (
|
||||
event.date === this.options.date ||
|
||||
|
@ -1921,8 +1921,11 @@ export class et2_calendar_planner extends et2_calendar_view implements et2_IDeta
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
waitForGroups.push((<CalendarApp>app.calendar)._fetch_group_members(event.data));
|
||||
let wait = (<CalendarApp>app.calendar)._fetch_group_members(event.data);
|
||||
if(wait !== null)
|
||||
{
|
||||
waitForGroups.push(wait);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(waitForGroups.length == 0)
|
||||
|
Loading…
Reference in New Issue
Block a user