@sonenta/react-i18next 2.3.1 → 2.3.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/dist/index.cjs +4 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -76,7 +76,9 @@ async function loadCatalog(apiBase, fetchImpl = fetch) {
|
|
|
76
76
|
const r = await fetchImpl(url, { method: "GET", credentials: "omit" });
|
|
77
77
|
if (!r.ok) return null;
|
|
78
78
|
const data = await r.json();
|
|
79
|
-
|
|
79
|
+
if (Array.isArray(data)) return data;
|
|
80
|
+
const items = data?.items;
|
|
81
|
+
return Array.isArray(items) ? items : null;
|
|
80
82
|
} catch {
|
|
81
83
|
return null;
|
|
82
84
|
}
|
|
@@ -238,7 +240,7 @@ function flattenPlurals(tree, locale) {
|
|
|
238
240
|
|
|
239
241
|
// src/transport.ts
|
|
240
242
|
var SDK_LIB = "@sonenta/react-i18next";
|
|
241
|
-
var SDK_VER = true ? "2.3.
|
|
243
|
+
var SDK_VER = true ? "2.3.2" : "0.0.0-dev";
|
|
242
244
|
function defaultTransport(opts) {
|
|
243
245
|
return async (batch) => {
|
|
244
246
|
if (!batch.length) return;
|