From c2c3b3ce08288b527f68f5c5ceb29648483f89a2 Mon Sep 17 00:00:00 2001 From: "Kent C. Dodds" Date: Wed, 2 Jul 2014 09:51:20 -0600 Subject: [PATCH] annotating this So other developers don't waste 3 hours before they realize that the minified vendor files they had which they thought were already annotated weren't. --- src/Scope.SafeApply.min.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Scope.SafeApply.min.js b/src/Scope.SafeApply.min.js index 17c119d..84733aa 100644 --- a/src/Scope.SafeApply.min.js +++ b/src/Scope.SafeApply.min.js @@ -1,6 +1,6 @@ -angular.module('Scope.safeApply',[]).run(function($rootScope){$rootScope.$safeApply=function(){var $scope,fn,force=false;if(arguments.length==1){var arg=arguments[0];if(typeof arg=='function'){fn=arg;} +angular.module('Scope.safeApply',[]).run(["$rootScope", function($rootScope){$rootScope.$safeApply=function(){var $scope,fn,force=false;if(arguments.length==1){var arg=arguments[0];if(typeof arg=='function'){fn=arg;} else{$scope=arg;}} else{$scope=arguments[0];fn=arguments[1];if(arguments.length==3){force=!!arguments[2];}} $scope=$scope||this;fn=fn||function(){};if(force||!$scope.$$phase){$scope.$apply?$scope.$apply(fn):$scope.apply(fn);} -else{fn();}};}); \ No newline at end of file +else{fn();}};}]);