Skip to content

Commit

Permalink
Update httpBackend, check window.XMLHttpRequest
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jorgt committed Jan 8, 2014
1 parent 75345e3 commit ac4e9a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ng/httpBackend.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
function createXhr(method) {
// IE8 doesn't support PATCH method, but the ActiveX object does
/* global ActiveXObject */
return (msie <= 8 && lowercase(method) === 'patch')
return ((msie <= 8 && lowercase(method) === 'patch') || isUndefined(window.XMLHttpRequest))
? new ActiveXObject('Microsoft.XMLHTTP')
: new window.XMLHttpRequest();
}
Expand Down

0 comments on commit ac4e9a7

Please sign in to comment.