mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Inline locale variable in fetchLocale fn
This commit is contained in:
parent
4521de19e6
commit
2526f8a1d8
@ -29,8 +29,7 @@ const getMessage = (locale, key, substitutions) => {
|
||||
async function fetchLocale (localeName) {
|
||||
try {
|
||||
const response = await fetch(`./_locales/${localeName}/messages.json`)
|
||||
const locale = await response.json()
|
||||
return locale
|
||||
return await response.json()
|
||||
} catch (error) {
|
||||
log.error(`failed to fetch ${localeName} locale because of ${error}`)
|
||||
return {}
|
||||
|
Loading…
Reference in New Issue
Block a user