diff --git a/src/safeApply.js b/src/safeApply.js index c61ceba..a3b3628 100644 --- a/src/safeApply.js +++ b/src/safeApply.js @@ -21,7 +21,7 @@ $scope.$apply(function () { onError(error); }); }, function (){ - ($scope.$$phase || $scope.$root.$$phase) ? + ($scope.$$destroyed || $scope.$$phase || $scope.$root.$$phase) ? onComplete() : $scope.$apply(function () { onComplete(); }); });