From 782128308c8020600551a9e21b59e445bf634970 Mon Sep 17 00:00:00 2001 From: Eugene Pankov Date: Sun, 16 Jan 2022 19:36:50 +0100 Subject: [PATCH] build fix --- tabby-core/src/tabContextMenu.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tabby-core/src/tabContextMenu.ts b/tabby-core/src/tabContextMenu.ts index 2a9f70c9..b40cb28d 100644 --- a/tabby-core/src/tabContextMenu.ts +++ b/tabby-core/src/tabContextMenu.ts @@ -109,6 +109,7 @@ export class CommonOptionsContextMenu extends TabContextMenuItemProvider { async getItems (tab: BaseTabComponent, tabHeader?: TabHeaderComponent): Promise { let items: MenuItemOptions[] = [] if (tabHeader) { + const currentColor = TAB_COLORS.find(x => x.value === tab.color)?.name items = [ ...items, { @@ -121,7 +122,7 @@ export class CommonOptionsContextMenu extends TabContextMenuItemProvider { }, { label: this.translate.instant('Color'), - sublabel: this.translate.instant(TAB_COLORS.find(x => x.value === tab.color)?.name), + sublabel: currentColor ? this.translate.instant(currentColor) : undefined, submenu: TAB_COLORS.map(color => ({ label: this.translate.instant(color.name) ?? color.name, type: 'radio',