aboutsummaryrefslogtreecommitdiffstats
path: root/src/Scope.js
diff options
context:
space:
mode:
authorMisko Hevery2010-05-07 13:43:54 -0700
committerMisko Hevery2010-05-07 13:43:54 -0700
commit0305b6746e2c50960b042c5d687794e030930f8b (patch)
treead8d670fad3a7ba93bc0efd443a5308e8a065235 /src/Scope.js
parent038a743e6f49c347a38edc0e54dcbb175905a475 (diff)
downloadangular.js-0305b6746e2c50960b042c5d687794e030930f8b.tar.bz2
change everything over to jasmine
Diffstat (limited to 'src/Scope.js')
-rw-r--r--src/Scope.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Scope.js b/src/Scope.js
index 9a20c214..687d3628 100644
--- a/src/Scope.js
+++ b/src/Scope.js
@@ -127,10 +127,11 @@ function createScope(parent, services, existing) {
var watch = expressionCompile(watchExp),
last;
function watcher(){
- var value = watch.call(instance);
+ var value = watch.call(instance),
+ lastValue = last;
if (last !== value) {
last = value;
- instance.$tryEval(listener, exceptionHandler, value, last);
+ instance.$tryEval(listener, exceptionHandler, value, lastValue);
}
}
instance.$onEval(PRIORITY_WATCH, watcher);