File tree Expand file tree Collapse file tree 3 files changed +23
-19
lines changed Expand file tree Collapse file tree 3 files changed +23
-19
lines changed Original file line number Diff line number Diff line change 121
121
122
122
for ( i = 0 ; i < functionsToWrap . length ; i ++ ) {
123
123
originals [ functionsToWrap [ i ] ] = store [ functionsToWrap [ i ] ] ;
124
- store [ functionsToWrap [ i ] ] = function ( ) {
125
- var args = arguments ;
126
- if ( ! $rootScope . $$phase ) {
127
- return $rootScope . $apply ( function ( ) {
128
- return originals [ functionsToWrap [ i ] ] . apply ( store , args ) ;
129
- } ) ;
130
- }
131
- return originals [ functionsToWrap [ i ] ] . apply ( store , args ) ;
132
- } ;
124
+ store [ functionsToWrap [ i ] ] = ( function ( name ) {
125
+ return function ( ) {
126
+ var args = arguments ;
127
+ if ( ! $rootScope . $$phase ) {
128
+ return $rootScope . $apply ( function ( ) {
129
+ return originals [ name ] . apply ( store , args ) ;
130
+ } ) ;
131
+ }
132
+ return originals [ name ] . apply ( store , args ) ;
133
+ } ;
134
+ } ) ( functionsToWrap [ i ] ) ;
133
135
}
134
136
135
137
return store ;
Original file line number Diff line number Diff line change 111
111
112
112
for ( i = 0 ; i < functionsToWrap . length ; i ++ ) {
113
113
originals [ functionsToWrap [ i ] ] = store [ functionsToWrap [ i ] ] ;
114
- store [ functionsToWrap [ i ] ] = function ( ) {
115
- var args = arguments ;
116
- if ( ! $rootScope . $$phase ) {
117
- return $rootScope . $apply ( function ( ) {
118
- return originals [ functionsToWrap [ i ] ] . apply ( store , args ) ;
119
- } ) ;
120
- }
121
- return originals [ functionsToWrap [ i ] ] . apply ( store , args ) ;
122
- } ;
114
+ store [ functionsToWrap [ i ] ] = ( function ( name ) {
115
+ return function ( ) {
116
+ var args = arguments ;
117
+ if ( ! $rootScope . $$phase ) {
118
+ return $rootScope . $apply ( function ( ) {
119
+ return originals [ name ] . apply ( store , args ) ;
120
+ } ) ;
121
+ }
122
+ return originals [ name ] . apply ( store , args ) ;
123
+ } ;
124
+ } ) ( functionsToWrap [ i ] ) ;
123
125
}
124
126
125
127
return store ;
You can’t perform that action at this time.
0 commit comments