Skip to content
This repository has been archived by the owner on Apr 22, 2024. It is now read-only.

Commit

Permalink
🐛 bug(addon): fix try import folder in locales (#42) by @orblazer
Browse files Browse the repository at this point in the history
  • Loading branch information
orblazer authored and kazupon committed May 1, 2019
1 parent 80bd269 commit 8f124b5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,11 @@ function assignValuesWithPath (path, value, messages) {

function getLocales (targetPath) {
debug('getLocales', targetPath)
return fs.readdirSync(targetPath).map(locale => {
return path.basename(locale, '.json')
})
return fs.readdirSync(targetPath)
.filter(locale => fs.statSync(path.join(targetPath, locale)).isFile())
.map(locale => {
return path.basename(locale, '.json')
})
}

function getLocaleMessages (targetPath, locales) {
Expand Down

0 comments on commit 8f124b5

Please sign in to comment.