Skip to content

Commit

Permalink
should fix #72
Browse files Browse the repository at this point in the history
  • Loading branch information
adrai committed May 25, 2022
1 parent 9b6e3ce commit b8b5ece
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions i18nextHttpBackend.js
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ if (typeof fetch === 'function') {

var XmlHttpRequestApi;

if (_utils.hasXMLHttpRequest) {
if ((0, _utils.hasXMLHttpRequest)()) {
if (typeof global !== 'undefined' && global.XMLHttpRequest) {
XmlHttpRequestApi = global.XMLHttpRequest;
} else if (typeof window !== 'undefined' && window.XMLHttpRequest) {
Expand Down Expand Up @@ -392,7 +392,7 @@ var request = function request(options, url, payload, callback) {
return requestWithFetch(options, url, payload, callback);
}

if (_utils.hasXMLHttpRequest || typeof ActiveXObject === 'function') {
if ((0, _utils.hasXMLHttpRequest)() || typeof ActiveXObject === 'function') {
return requestWithXmlHttpRequest(options, url, payload, callback);
}
};
Expand Down
2 changes: 1 addition & 1 deletion i18nextHttpBackend.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions lib/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ if (typeof fetch === 'function') {
}
}
let XmlHttpRequestApi
if (hasXMLHttpRequest) {
if (hasXMLHttpRequest()) {
if (typeof global !== 'undefined' && global.XMLHttpRequest) {
XmlHttpRequestApi = global.XMLHttpRequest
} else if (typeof window !== 'undefined' && window.XMLHttpRequest) {
Expand Down Expand Up @@ -118,7 +118,7 @@ const request = (options, url, payload, callback) => {
return requestWithFetch(options, url, payload, callback)
}

if (hasXMLHttpRequest || typeof ActiveXObject === 'function') {
if (hasXMLHttpRequest() || typeof ActiveXObject === 'function') {
// use xml http request
return requestWithXmlHttpRequest(options, url, payload, callback)
}
Expand Down

0 comments on commit b8b5ece

Please sign in to comment.