File tree 2 files changed +15
-1
lines changed
2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -1907,7 +1907,7 @@ function $ParseProvider() {
1907
1907
if ( isDone ( lastValue ) ) {
1908
1908
scope . $$postDigest ( unwatchIfDone ) ;
1909
1909
}
1910
- return post ( lastValue , scope , locals ) ;
1910
+ return post ( lastValue ) ;
1911
1911
}
1912
1912
}
1913
1913
Original file line number Diff line number Diff line change @@ -3246,6 +3246,20 @@ describe('parser', function() {
3246
3246
expect ( args ) . toEqual ( [ 1 ] ) ;
3247
3247
} ) ) ;
3248
3248
3249
+ it ( 'should only be passed the intercepted value when wrapping one-time' , inject ( function ( $parse ) {
3250
+ var args ;
3251
+ function interceptor ( v ) {
3252
+ args = sliceArgs ( arguments ) ;
3253
+ return v ;
3254
+ }
3255
+
3256
+ scope . $watch ( $parse ( '::a' , interceptor ) ) ;
3257
+
3258
+ scope . a = 1 ;
3259
+ scope . $digest ( ) ;
3260
+ expect ( args ) . toEqual ( [ 1 ] ) ;
3261
+ } ) ) ;
3262
+
3249
3263
it ( 'should only be passed the intercepted value when double-intercepted' ,
3250
3264
inject ( function ( $parse ) {
3251
3265
var args1 ;
You can’t perform that action at this time.
0 commit comments