From f99d55905be41545b705fa69184927befe9d83a9 Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Mon, 23 Jul 2018 16:10:55 +0200 Subject: [PATCH] MOBILE-2449 menu: Fix custom menu items not displayed --- src/core/mainmenu/providers/mainmenu.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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'; + }); }); }); }