Skip to content

Commit b8b5ece

Browse files
committed
should fix #72
1 parent 9b6e3ce commit b8b5ece

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

i18nextHttpBackend.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ if (typeof fetch === 'function') {
264264

265265
var XmlHttpRequestApi;
266266

267-
if (_utils.hasXMLHttpRequest) {
267+
if ((0, _utils.hasXMLHttpRequest)()) {
268268
if (typeof global !== 'undefined' && global.XMLHttpRequest) {
269269
XmlHttpRequestApi = global.XMLHttpRequest;
270270
} else if (typeof window !== 'undefined' && window.XMLHttpRequest) {
@@ -392,7 +392,7 @@ var request = function request(options, url, payload, callback) {
392392
return requestWithFetch(options, url, payload, callback);
393393
}
394394

395-
if (_utils.hasXMLHttpRequest || typeof ActiveXObject === 'function') {
395+
if ((0, _utils.hasXMLHttpRequest)() || typeof ActiveXObject === 'function') {
396396
return requestWithXmlHttpRequest(options, url, payload, callback);
397397
}
398398
};

i18nextHttpBackend.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/request.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ if (typeof fetch === 'function') {
1010
}
1111
}
1212
let XmlHttpRequestApi
13-
if (hasXMLHttpRequest) {
13+
if (hasXMLHttpRequest()) {
1414
if (typeof global !== 'undefined' && global.XMLHttpRequest) {
1515
XmlHttpRequestApi = global.XMLHttpRequest
1616
} else if (typeof window !== 'undefined' && window.XMLHttpRequest) {
@@ -118,7 +118,7 @@ const request = (options, url, payload, callback) => {
118118
return requestWithFetch(options, url, payload, callback)
119119
}
120120

121-
if (hasXMLHttpRequest || typeof ActiveXObject === 'function') {
121+
if (hasXMLHttpRequest() || typeof ActiveXObject === 'function') {
122122
// use xml http request
123123
return requestWithXmlHttpRequest(options, url, payload, callback)
124124
}

0 commit comments

Comments
 (0)