@indigina/ui-kit 1.1.361 → 1.1.362
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -10047,6 +10047,9 @@ class KitTranslateLoader {
|
|
|
10047
10047
|
this.http = http;
|
|
10048
10048
|
this.defaultPathPerfix = defaultPathPerfix;
|
|
10049
10049
|
this.overridePathPrefix = overridePathPrefix;
|
|
10050
|
+
this.isTranslationObject = (value) => {
|
|
10051
|
+
return Boolean(value && typeof value === 'object' && !Array.isArray(value));
|
|
10052
|
+
};
|
|
10050
10053
|
}
|
|
10051
10054
|
getTranslation(lang) {
|
|
10052
10055
|
const timestamp = new Date().getTime();
|
|
@@ -10063,9 +10066,7 @@ class KitTranslateLoader {
|
|
|
10063
10066
|
}
|
|
10064
10067
|
const result = { ...target };
|
|
10065
10068
|
for (const key of Object.keys(source)) {
|
|
10066
|
-
if (source[key] &&
|
|
10067
|
-
typeof source[key] === 'object' &&
|
|
10068
|
-
!Array.isArray(source[key])) {
|
|
10069
|
+
if (this.isTranslationObject(source[key]) && this.isTranslationObject(result[key])) {
|
|
10069
10070
|
result[key] = this.deepMerge(result[key] ?? {}, source[key]);
|
|
10070
10071
|
}
|
|
10071
10072
|
else {
|