guy 7 years ago
parent
commit
8d2fbcf7b6
  1. 13
      dist/fix/fix.js

13
dist/fix/fix.js vendored

@ -371,6 +371,15 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
shouldConvert: true
};
function def(obj, key, val, enumerable) {
Object.defineProperty(obj, key, {
value: val,
enumerable: !!enumerable,
writable: true,
configurable: true
});
}
/**
* Observer class that are attached to each observed
* object. Once attached, the observer converts target
@ -392,8 +401,12 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
} else {
this.model = this.walk(value);
}
try {
def(this.model, "__ob__", this);
} catch (e) {
this.model['__ob__'] = this;
}
}
Observer.prototype.walk = function walk(obj) {
return defineReactive(obj, this);

Loading…
Cancel
Save