From c794849420fc8584c20a4fef34a01cffc593d768 Mon Sep 17 00:00:00 2001 From: Arian Stolwijk Date: Wed, 30 Jan 2013 13:11:43 +0100 Subject: [PATCH] Propagate changes correctly (thanks @kentaromiura) --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index ac0c649..dfa46a0 100644 --- a/index.js +++ b/index.js @@ -25,9 +25,9 @@ Rx.prototype.get = function(){ Rx.prototype.update = function(){ if (!this.action) return this; - this.value = this.action.apply(this, this.dependencies.map(function(dep){ + this.set(this.action.apply(this, this.dependencies.map(function(dep){ return dep.get(); - }).concat([this.value]).concat(slice.call(arguments))); + }).concat([this.value]).concat(slice.call(arguments)))); return this; };