From 2526f8a1d8f59758b7bc04bb088fab6ad74b16a1 Mon Sep 17 00:00:00 2001 From: Whymarrh Whitby Date: Mon, 9 Jul 2018 17:24:12 -0230 Subject: Inline locale variable in fetchLocale fn --- ui/i18n-helper.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ui/i18n-helper.js b/ui/i18n-helper.js index 79aa93116..269f6e1a4 100644 --- a/ui/i18n-helper.js +++ b/ui/i18n-helper.js @@ -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 {} -- cgit v1.2.3