Skip to content

Commit ac4e9a7

Browse files
committed
Update httpBackend, check window.XMLHttpRequest
As per this issue: angular#5677 window.XMLHttpRequest is not always available in IE8 despite it not running in quirks mode, in which case Angular should be using the ActiveXObject instead. Just checking the browser version is taking too many shortcuts.
1 parent 75345e3 commit ac4e9a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ng/httpBackend.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
function createXhr(method) {
44
// IE8 doesn't support PATCH method, but the ActiveX object does
55
/* global ActiveXObject */
6-
return (msie <= 8 && lowercase(method) === 'patch')
6+
return ((msie <= 8 && lowercase(method) === 'patch') || isUndefined(window.XMLHttpRequest))
77
? new ActiveXObject('Microsoft.XMLHTTP')
88
: new window.XMLHttpRequest();
99
}

0 commit comments

Comments
 (0)