aboutsummaryrefslogtreecommitdiffstats
path: root/src/ng/httpBackend.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/ng/httpBackend.js')
-rw-r--r--src/ng/httpBackend.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/ng/httpBackend.js b/src/ng/httpBackend.js
index d2806e3e..f52e4611 100644
--- a/src/ng/httpBackend.js
+++ b/src/ng/httpBackend.js
@@ -84,11 +84,12 @@ function createHttpBackend($browser, createXhr, $browserDefer, callbacks, rawDoc
if(status !== ABORTED) {
responseHeaders = xhr.getAllResponseHeaders();
- response = xhr.responseType ? xhr.response : xhr.responseText;
+
+ // responseText is the old-school way of retrieving response (supported by IE8 & 9)
+ // response/responseType properties were introduced in XHR Level2 spec (supported by IE10)
+ response = ('response' in xhr) ? xhr.response : xhr.responseText;
}
- // responseText is the old-school way of retrieving response (supported by IE8 & 9)
- // response/responseType properties were introduced in XHR Level2 spec (supported by IE10)
completeRequest(callback,
status || xhr.status,
response,