diff --git a/src/core/mainmenu/providers/mainmenu.ts b/src/core/mainmenu/providers/mainmenu.ts index abcec6f65..ac38ef92b 100644 --- a/src/core/mainmenu/providers/mainmenu.ts +++ b/src/core/mainmenu/providers/mainmenu.ts @@ -139,7 +139,7 @@ export class CoreMainMenuProvider { if (!data) { // No valid label, ignore this entry. - return; + continue; } } @@ -151,7 +151,10 @@ export class CoreMainMenuProvider { }; } - return result; + // Remove undefined values. + return result.filter((entry) => { + return typeof entry != 'undefined'; + }); }); }); }