File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,7 +16,8 @@ angularServiceInject('$cookies', function($browser) {
1616 var rootScope = this ,
1717 cookies = { } ,
1818 lastCookies = { } ,
19- lastBrowserCookies ;
19+ lastBrowserCookies ,
20+ runEval = false ;
2021
2122 //creates a poller fn that copies all cookies from the $browser to service & inits the service
2223 $browser . addPollFn ( function ( ) {
@@ -25,10 +26,12 @@ angularServiceInject('$cookies', function($browser) {
2526 lastBrowserCookies = currentCookies ;
2627 copy ( currentCookies , lastCookies ) ;
2728 copy ( currentCookies , cookies ) ;
28- rootScope . $eval ( ) ;
29+ if ( runEval ) rootScope . $eval ( ) ;
2930 }
3031 } ) ( ) ;
3132
33+ runEval = true ;
34+
3235 //at the end of each eval, push cookies
3336 //TODO: this should happen before the "delayed" watches fire, because if some cookies are not
3437 // strings or browser refuses to store some cookies, we update the model in the push fn.
You can’t perform that action at this time.
0 commit comments