Remove standard lint warnings
This commit is contained in:
parent
01f96fe6af
commit
2efc913222
1 changed files with 3 additions and 3 deletions
|
@ -18,9 +18,9 @@ const getExtensionMetadata = (extensionId) => {
|
|||
}
|
||||
|
||||
const getMessagesPath = (extensionId, language) => {
|
||||
const {srcDirectory, default_locale} = getExtensionMetadata(extensionId)
|
||||
const defaultLocale = default_locale != null ? default_locale : 'en'
|
||||
const localesDirectory = path.join(srcDirectory, '_locales')
|
||||
const metadata = getExtensionMetadata(extensionId)
|
||||
const defaultLocale = metadata.default_locale || 'en'
|
||||
const localesDirectory = path.join(metadata.srcDirectory, '_locales')
|
||||
let messagesPath = path.join(localesDirectory, language, 'messages.json')
|
||||
if (!fs.statSyncNoException(messagesPath)) {
|
||||
messagesPath = path.join(localesDirectory, defaultLocale, 'messages.json')
|
||||
|
|
Loading…
Reference in a new issue