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 getMessagesPath = (extensionId, language) => {
|
||||||
const {srcDirectory, default_locale} = getExtensionMetadata(extensionId)
|
const metadata = getExtensionMetadata(extensionId)
|
||||||
const defaultLocale = default_locale != null ? default_locale : 'en'
|
const defaultLocale = metadata.default_locale || 'en'
|
||||||
const localesDirectory = path.join(srcDirectory, '_locales')
|
const localesDirectory = path.join(metadata.srcDirectory, '_locales')
|
||||||
let messagesPath = path.join(localesDirectory, language, 'messages.json')
|
let messagesPath = path.join(localesDirectory, language, 'messages.json')
|
||||||
if (!fs.statSyncNoException(messagesPath)) {
|
if (!fs.statSyncNoException(messagesPath)) {
|
||||||
messagesPath = path.join(localesDirectory, defaultLocale, 'messages.json')
|
messagesPath = path.join(localesDirectory, defaultLocale, 'messages.json')
|
||||||
|
|
Loading…
Reference in a new issue