From 968c82578741214f4f8dba60a779b576fa317b26 Mon Sep 17 00:00:00 2001 From: Marc Durdin Date: Mon, 8 Mar 2021 21:39:16 +1100 Subject: [PATCH] fix(web): use language code correctly in toolbar Fixes #4566. When the toolbar shows a differentiation for the language code, it was not using the correct minification-safe property name, which resulted in `[undefined]` being displayed instead. --- web/source/kmwuitoolbar.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/source/kmwuitoolbar.ts b/web/source/kmwuitoolbar.ts index eb15399a61..73fc9bb88b 100644 --- a/web/source/kmwuitoolbar.ts +++ b/web/source/kmwuitoolbar.ts @@ -531,7 +531,7 @@ if(!window['keyman']['ui']['name']) { var itemNode = ui.createNode('li'); kbdText = lang.keyboards[n]['Name'].replace(/\s?keyboard/i,''); // We append the full BCP-47 code here for disambiguation when regional and/or script variants exist. - kbdText = kbdText + " [" + lang.keyboards[n].LanguageCode + "]"; + kbdText = kbdText + " [" + lang.keyboards[n]['LanguageCode'] + "]"; aNode = ui.createNode('a', null, null, kbdText); aNode.href = '#'; aNode.title = '';