@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.js CHANGED
@@ -46,7 +46,9 @@ async function loadCatalog(apiBase, fetchImpl = fetch) {
46
46
  const r = await fetchImpl(url, { method: "GET", credentials: "omit" });
47
47
  if (!r.ok) return null;
48
48
  const data = await r.json();
49
- return Array.isArray(data) ? data : null;
49
+ if (Array.isArray(data)) return data;
50
+ const items = data?.items;
51
+ return Array.isArray(items) ? items : null;
50
52
  } catch {
51
53
  return null;
52
54
  }
@@ -210,7 +212,7 @@ function flattenPlurals(tree, locale) {
210
212
 
211
213
  // src/transport.ts
212
214
  var SDK_LIB = "@sonenta/react-i18next";
213
- var SDK_VER = true ? "2.3.1" : "0.0.0-dev";
215
+ var SDK_VER = true ? "2.3.2" : "0.0.0-dev";
214
216
  function defaultTransport(opts) {
215
217
  return async (batch) => {
216
218
  if (!batch.length) return;