From 2eedc7070a7b03e979b762376adc527d9be476ab Mon Sep 17 00:00:00 2001 From: Todd Motto Date: Wed, 28 May 2014 22:06:54 +0100 Subject: [PATCH] Simplify watchGroupFn assignment --- src/ng/rootScope.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/ng/rootScope.js b/src/ng/rootScope.js index 030e0b05c248..de1514853175 100644 --- a/src/ng/rootScope.js +++ b/src/ng/rootScope.js @@ -400,11 +400,7 @@ function $RootScopeProvider(){ deregisterFns.push(self.$watch(watchGroupFn, function () { listener(newValues, oldValues, self); - if (unwatchCount === 0) { - watchGroupFn.$$unwatch = true; - } else { - watchGroupFn.$$unwatch = false; - } + watchGroupFn.$$unwatch = unwatchCount === 0 ? true : false; })); return function deregisterWatchGroup() {