Skip to content

Commit

Permalink
fix(jsonProcessor): shouldn't create prop if value is empty, allowing…
Browse files Browse the repository at this point in the history
… proper fallback
  • Loading branch information
NamesMT committed Jan 28, 2024
1 parent e2ca459 commit f7c8388
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,10 @@ export function createContext(options: Options = {}, root = process.cwd!()) {
})

locales.forEach((locale) => {
const value = objectGet(row, locale)
const value = row[locale]

if (!value)
return

objectSet(obj, [...path.split('.'), 'i18n', locale, key], value)
})
Expand Down

0 comments on commit f7c8388

Please sign in to comment.