mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-24 03:55:49 +08:00
fix(Scope): don't clear the phase when an exception is thrown from asyncQueue or watch
If we clear it here, then any other watch or async task could start a new digest.
This commit is contained in:
@@ -176,15 +176,6 @@ describe('Scope', function() {
|
||||
});
|
||||
});
|
||||
|
||||
it('should clear phase if an exception interrupt $digest cycle', function() {
|
||||
inject(function($rootScope) {
|
||||
$rootScope.$watch('a', function() {throw new Error('abc');});
|
||||
$rootScope.a = 1;
|
||||
try { $rootScope.$digest(); } catch(e) { }
|
||||
expect($rootScope.$$phase).toBeNull();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
it('should fire watches in order of addition', inject(function($rootScope) {
|
||||
// this is not an external guarantee, just our own sanity
|
||||
|
||||
Reference in New Issue
Block a user