Improve some login/logout handling

This commit is contained in:
the-djmaze 2022-10-18 23:32:47 +02:00
parent b77854e421
commit 93d8b5a419
4 changed files with 11 additions and 16 deletions

View file

@ -34,7 +34,7 @@ export const
* @returns {string}
*/
i18n = (key, valueList, defaulValue) => {
let result = defaulValue || key;
let result = null == defaulValue ? key : defaulValue;
let path = key.split('/');
if (I18N_DATA[path[0]] && path[1]) {
result = I18N_DATA[path[0]][path[1]] || result;