return early for undefined i18n messages
could happen when we map over a list of objects to create buttons and one only has an icon
This commit is contained in:
parent
dc6267f757
commit
41dfd8a0f8
1 changed files with 4 additions and 0 deletions
|
@ -79,6 +79,10 @@ function removeContextMetadata(message) {
|
|||
}
|
||||
|
||||
export function __(message, tokens) {
|
||||
if (!message) {
|
||||
return '';
|
||||
}
|
||||
|
||||
const language = localStorageAvailable
|
||||
? window.localStorage.getItem('language') || 'en'
|
||||
: window.navigator.language.slice(0, 2) || 'en';
|
||||
|
|
Loading…
Add table
Reference in a new issue