Skip to content

Commit

Permalink
optimize fetchApi selector
Browse files Browse the repository at this point in the history
  • Loading branch information
adrai committed Jan 23, 2025
1 parent cd1649d commit 9c04ef0
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 19 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### 3.0.2

- optimize fetchApi selector

### 3.0.1

- try to get rid of top-level await
Expand Down
14 changes: 5 additions & 9 deletions i18nextHttpBackend.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,15 +216,11 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
var fetchApi;
if (typeof fetch === 'function') {
if (typeof global !== 'undefined' && global.fetch) {
fetchApi = global.fetch;
} else if (typeof window !== 'undefined' && window.fetch) {
fetchApi = window.fetch;
} else {
fetchApi = fetch;
}
var fetchApi = typeof fetch === 'function' ? fetch : undefined;
if (typeof global !== 'undefined' && global.fetch) {
fetchApi = global.fetch;
} else if (typeof window !== 'undefined' && window.fetch) {
fetchApi = window.fetch;
}
var XmlHttpRequestApi;
if ((0, _utils.hasXMLHttpRequest)()) {
Expand Down
Loading

0 comments on commit 9c04ef0

Please sign in to comment.