From fd9a03e147aac7e952c6dda1f381fd4662276ba2 Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Thu, 2 Jan 2014 22:47:39 -0800 Subject: [PATCH] fix(httpBackend): fix 'type mismatch' error on IE8 after each request --- src/ng/httpBackend.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ng/httpBackend.js b/src/ng/httpBackend.js index c72ae4bbecd6..ffc51abf2957 100644 --- a/src/ng/httpBackend.js +++ b/src/ng/httpBackend.js @@ -75,7 +75,9 @@ function createHttpBackend($browser, createXhr, $browserDefer, callbacks, rawDoc // onreadystatechange might by called multiple times // with readyState === 4 on mobile webkit caused by // xhrs that are resolved while the app is in the background (see #5426). - xhr.onreadystatechange = undefined; + // + // we must delete the property instead of setting it to undefined/null to make IE8 happy. + delete xhr.onreadystatechange; var responseHeaders = null, response = null;