fix: i18n create empty entries error (#1278)

This commit is contained in:
Gene 2025-04-02 09:19:34 +08:00 committed by GitHub
parent 17a3b67015
commit b7164bb57d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -62,7 +62,7 @@ const removeI18n = (key = []) => {
const ensureI18n = (obj, send) => { const ensureI18n = (obj, send) => {
const { locales } = i18nResource const { locales } = i18nResource
const contents = Object.fromEntries(locales.map(({ lang }) => [lang, obj[lang]])) const contents = Object.fromEntries(locales.map(({ lang }) => [lang, obj[lang] || '']))
const langs = getLangs() const langs = getLangs()
const key = obj.key || utils.guid() const key = obj.key || utils.guid()