Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 35eada6

Browse files
committed
refactor($parse): simplify constantWatchDelegate
Closes: #13176
1 parent bfad2a4 commit 35eada6

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/ng/parse.js

+2-6
Original file line numberDiff line numberDiff line change
@@ -1894,13 +1894,9 @@ function $ParseProvider() {
18941894
function constantWatchDelegate(scope, listener, objectEquality, parsedExpression) {
18951895
var unwatch;
18961896
return unwatch = scope.$watch(function constantWatch(scope) {
1897-
return parsedExpression(scope);
1898-
}, function constantListener(value, old, scope) {
1899-
if (isFunction(listener)) {
1900-
listener.apply(this, arguments);
1901-
}
19021897
unwatch();
1903-
}, objectEquality);
1898+
return parsedExpression(scope);
1899+
}, listener, objectEquality);
19041900
}
19051901

19061902
function addInterceptor(parsedExpression, interceptorFn) {

0 commit comments

Comments
 (0)