fix JS error, if user has no preferences or favorites

This commit is contained in:
ralf 2022-08-04 09:08:46 +02:00
parent e1af1f3765
commit 509fbd73e9

View File

@ -103,7 +103,7 @@ export class Et2Favorites extends Et2DropdownButton implements et2_INextmatchHea
public static readonly PREFIX = "favorite_";
protected static readonly ADD_VALUE = "~add~";
private favSortedList : any = null;
private favSortedList : any = [];
private _preferred : string;
private _nextmatch : et2_nextmatch;
@ -203,6 +203,7 @@ export class Et2Favorites extends Et2DropdownButton implements et2_INextmatchHea
};
// Load saved favorites
this.favSortedList = [];
let preferences : any = this.egw().preference("*", app);
for(let pref_name in preferences)
{