From c63a25b18e86c539aec7268247ecfc6f15c3e998 Mon Sep 17 00:00:00 2001 From: Yana De Pauw Date: Tue, 26 Apr 2022 14:42:53 +0200 Subject: [PATCH] 89984: Fix getComponentForMenu themed method --- src/app/shared/menu/menu-section.decorator.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/app/shared/menu/menu-section.decorator.ts b/src/app/shared/menu/menu-section.decorator.ts index 94a0469a7e..9374ab3c0d 100644 --- a/src/app/shared/menu/menu-section.decorator.ts +++ b/src/app/shared/menu/menu-section.decorator.ts @@ -1,6 +1,6 @@ import { DEFAULT_THEME } from '../object-collection/shared/listable-object/listable-object.decorator'; import { MenuID } from './initial-menus-state'; -import { hasNoValue } from '../empty.util'; +import { hasNoValue, hasValue } from '../empty.util'; const menuComponentMap = new Map(); @@ -33,7 +33,9 @@ export function rendersSectionForMenu(menuID: MenuID, expandable: boolean, theme */ export function getComponentForMenu(menuID: MenuID, expandable: boolean, theme: string) { const comp = menuComponentMap.get(menuID).get(expandable).get(theme); - if (hasNoValue(comp)) { + if (hasValue(comp)) { + return comp; + } else { return menuComponentMap.get(menuID).get(expandable).get(DEFAULT_THEME); } }