1
0
Fork 0

fix(core): Make mergeI18n options optional

This commit is contained in:
joostdecock 2023-06-17 20:15:33 +02:00
parent 1264a07afe
commit 73dc20e1d2

View file

@ -459,7 +459,7 @@ export function mergeI18n(designs, options) {
if (obj[section]) {
if (typeof i18n[lang][section] === 'undefined') i18n[lang][section] = {}
for (const [key, val] of Object.entries(obj[section])) {
if (__keepTranslation(key, options[section])) i18n[lang][section][key] = val
if (__keepTranslation(key, options?.[section])) i18n[lang][section][key] = val
}
}
}