From cdd2d5285daaacf7694f9f29549f216883cefb94 Mon Sep 17 00:00:00 2001 From: thorn0 Date: Fri, 16 Oct 2015 17:34:20 +0300 Subject: [PATCH] Not a 'real' PR, but a demo for #13108 --- src/ng/http.js | 3 ++- test/ng/httpSpec.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ng/http.js b/src/ng/http.js index e30d04e1ea71..21fe53fa260e 100644 --- a/src/ng/http.js +++ b/src/ng/http.js @@ -1269,7 +1269,8 @@ function $HttpProvider() { } if (useApplyAsync) { - $rootScope.$applyAsync(resolveHttpPromise); + // $rootScope.$applyAsync(resolveHttpPromise); + resolveHttpPromise(); } else { resolveHttpPromise(); if (!$rootScope.$$phase) $rootScope.$apply(); diff --git a/test/ng/httpSpec.js b/test/ng/httpSpec.js index 168305eab34f..3c1666a0d361 100644 --- a/test/ng/httpSpec.js +++ b/test/ng/httpSpec.js @@ -1928,7 +1928,7 @@ describe('$http with $applyAsync', function() { $rootScope.$digest(); $httpBackend.flush(null, false); - expect($rootScope.$applyAsync).toHaveBeenCalledOnce(); + // expect($rootScope.$applyAsync).toHaveBeenCalledOnce(); expect(handler).not.toHaveBeenCalled(); $browser.defer.flush();