@zachhandley/ez-i18n 0.4.1 → 0.4.11

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.
Files changed (2) hide show
  1. package/dist/index.js +2 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -947,6 +947,7 @@ async function __loadPublicJson(url, absolutePath) {
947
947
  if (typeof window !== 'undefined' && typeof document !== 'undefined') {
948
948
  const response = await fetch(url);
949
949
  if (!response.ok) {
950
+ if (response.status === 404) return {};
950
951
  throw new Error(\`Failed to fetch translations from \${url}: \${response.status}\`);
951
952
  }
952
953
  return __parseJsonResponse(response);
@@ -957,6 +958,7 @@ async function __loadPublicJson(url, absolutePath) {
957
958
  if (assets && typeof assets.fetch === 'function') {
958
959
  const response = await assets.fetch(new URL(url, 'https://assets.local'));
959
960
  if (!response.ok) {
961
+ if (response.status === 404) return {};
960
962
  throw new Error(\`Failed to fetch translations from \${url}: \${response.status}\`);
961
963
  }
962
964
  return __parseJsonResponse(response);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zachhandley/ez-i18n",
3
- "version": "0.4.1",
3
+ "version": "0.4.11",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },