vendor/components/indefinido-observable/lib/observable.js in ende-0.4.3 vs vendor/components/indefinido-observable/lib/observable.js in ende-0.4.4
- old
+ new
@@ -1,6 +1,7 @@
// TODO Better keypath support
+// TODO Convert to coffeescript
// Shim older browsers
if (!Object.create ) require('../vendor/shims/object.create');
if (!Array.prototype.indexOf) require('../vendor/shims/array.indexOf');
@@ -181,11 +182,11 @@
};
check = function (keypath, value) {
this.observed[keypath] = value;
- // TODO implement subscription
- (this.dirty === false) && (this.dirty = true);
+ // TODO implement subscription to any change, using Object.observe
+ (this.dirty === false && keypath != 'dirty') && (this.dirty = true);
return true;
};
generator = {
observe: function(keypath, callback) {