From 5d1c4c289fe4429e7b8786d24a6b718deb591777 Mon Sep 17 00:00:00 2001 From: ccheng-dev Date: Thu, 13 Jun 2024 06:45:46 +0200 Subject: [PATCH] fix(Addressbook/js): validate string in preferred address renderrer --- tine20/Addressbook/js/ContactGrid.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tine20/Addressbook/js/ContactGrid.js b/tine20/Addressbook/js/ContactGrid.js index 0de0c1820d..c5b9f40c3e 100644 --- a/tine20/Addressbook/js/ContactGrid.js +++ b/tine20/Addressbook/js/ContactGrid.js @@ -231,12 +231,11 @@ Tine.Addressbook.ContactGridPanel.countryRenderer = function(data) { * @return {*} */ Tine.Addressbook.ContactGridPanel.preferredAddressRenderer = function(value) { - var i18n = Tine.Tinebase.appMgr.get('Addressbook').i18n; - + const i18n = Tine.Tinebase.appMgr.get('Addressbook').i18n; switch (value) { - case '0': + case 'adr_one': return i18n._('Business'); - case '1': + case 'adr_two': return i18n._('Private'); default: return i18n._('Not set');