Remove standard lint warnings

This commit is contained in:
Kevin Sawicki 2016-06-09 14:17:54 -07:00
parent 01f96fe6af
commit 2efc913222

View file

@ -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')