SIGN IN SIGN UP
angular / angular.js UNCLAIMED

AngularJS - HTML enhanced for web apps!

0 0 181 JavaScript

fix(ngMock): don't break if `$rootScope.$destroy()` is not a function

Previously, `angular-mocks` was calling `$rootScope.$destroy()` after each test as part of it's
cleaning up, assuming that it was always available. This could break if `$rootScope` was mocked
and the mocked version didn't provide the `$destroy()` method.
This commit prevents the error by first checking that `$rootScope.$destroy` is present.

Fixes #14106

Closes #14107
G
Georgios Kalpakas committed
24a7f28f1e82eb1d39188fb00d8572d6856ddeb7
Parent: 146f9c1