@json-layout/core 1.7.0 → 1.7.2
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.
package/package.json
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* @param {string} [defaultLocale]
|
|
7
7
|
*/
|
|
8
8
|
export const resolveXI18n = (schema, locale, defaultLocale = 'en') => {
|
|
9
|
+
if (!schema || typeof schema !== 'object') return
|
|
9
10
|
for (const [key, value] of Object.entries(schema)) {
|
|
10
11
|
if (key.startsWith('x-i18n-')) {
|
|
11
12
|
if (typeof value !== 'object') console.error(`i18n property ${key} should be an object`)
|
|
@@ -16,7 +17,7 @@ export const resolveXI18n = (schema, locale, defaultLocale = 'en') => {
|
|
|
16
17
|
for (const child of value) {
|
|
17
18
|
resolveXI18n(child, locale, defaultLocale)
|
|
18
19
|
}
|
|
19
|
-
}
|
|
20
|
+
} else {
|
|
20
21
|
resolveXI18n(value, locale, defaultLocale)
|
|
21
22
|
}
|
|
22
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"x-i18n.d.ts","sourceRoot":"","sources":["../../../src/compile/utils/x-i18n.js"],"names":[],"mappings":"AAOO,qCAJI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,UACnB,MAAM,kBACN,MAAM,
|
|
1
|
+
{"version":3,"file":"x-i18n.d.ts","sourceRoot":"","sources":["../../../src/compile/utils/x-i18n.js"],"names":[],"mappings":"AAOO,qCAJI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,UACnB,MAAM,kBACN,MAAM,QAkBhB"}
|