From 6ff314e77147662f2756da9a07f22a1b4c8992f5 Mon Sep 17 00:00:00 2001 From: Adriano Raiano Date: Thu, 18 Apr 2024 18:12:31 +0200 Subject: [PATCH] release --- CHANGELOG.md | 4 ++++ i18nextHttpBackend.js | 2 +- i18nextHttpBackend.min.js | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aebdb48..4b5a7c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +### 2.5.1 + +- fix: remove typeof window.document === 'undefined' check which deopt bundle optimization [137](https://github.com/i18next/i18next-http-backend/pull/137) + ### 2.5.0 - added fetch interceptor to the Backend Options [133](https://github.com/i18next/i18next-http-backend/pull/133) diff --git a/i18nextHttpBackend.js b/i18nextHttpBackend.js index ee14f12..201e66b 100644 --- a/i18nextHttpBackend.js +++ b/i18nextHttpBackend.js @@ -11,7 +11,7 @@ if (typeof fetch === 'function') { } } -if (typeof require !== 'undefined' && (typeof window === 'undefined' || typeof window.document === 'undefined')) { +if (typeof require !== 'undefined' && typeof window === 'undefined') { var f = fetchApi || require('cross-fetch') if (f.default) f = f.default exports.default = f diff --git a/i18nextHttpBackend.min.js b/i18nextHttpBackend.min.js index d00c85d..2473687 100644 --- a/i18nextHttpBackend.min.js +++ b/i18nextHttpBackend.min.js @@ -1 +1 @@ -!function(e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).i18nextHttpBackend=e()}(function(){return function o(r,i,s){function a(t,e){if(!i[t]){if(!r[t]){var n="function"==typeof require&&require;if(!e&&n)return n(t,!0);if(u)return u(t,!0);throw(e=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",e}n=i[t]={exports:{}},r[t][0].call(n.exports,function(e){return a(r[t][1][e]||e)},n,n.exports,o,r,i,s)}return i[t].exports}for(var u="function"==typeof require&&require,e=0;e