From 73dc20e1d2a23bafcd38c4e429d5bb1f0a9c63a4 Mon Sep 17 00:00:00 2001 From: joostdecock Date: Sat, 17 Jun 2023 20:15:33 +0200 Subject: [PATCH] fix(core): Make mergeI18n options optional --- packages/core/src/utils.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/utils.mjs b/packages/core/src/utils.mjs index 6eff986b2b0..740ecc7f366 100644 --- a/packages/core/src/utils.mjs +++ b/packages/core/src/utils.mjs @@ -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 } } }