fix($timeout/$interval): do not trigger a digest on cancel
Previously, `.catch(noop)` was used on a rejected timeout/interval to prevent an unhandled rejection error (introduced in #c9dffde1cb). However this would schedule a deferred task to run the `noop`. If the cancelling was outside a digest this could cause a new digest such as with the ng-model `debounce` option. For unit testing, this means that it's no longer necessary to use `$timeout.flush()` when a `$timeout` has been cancelled outside of a digest. Previously, this was necessary to execute the deferred task added by `.catch(noop). There's an example of such a change in this commit's changeset in the file `/test/ngAnimate/animateCssSpec.js`. Fixes #16057 Closes #16064
J
Jason Bedard committed
a222d0b452622624dc498ef0b9d3c43647fd4fbc
Parent: 1b8eb23
Committed by Martin Staffa <mjstaffa@gmail.com>
on 7/3/2017, 9:10:00 AM