Browse Source

observer conversion enumeration should not include prototype properties

dev
Evan You 8 years ago
parent
commit
4c7a87e2ef
  1. 6
      src/core/observer/index.js

6
src/core/observer/index.js

@ -58,9 +58,9 @@ export class Observer {
* value type is Object.
*/
walk (obj: Object) {
const val = this.value
for (const key in obj) {
defineReactive(val, key, obj[key])
const keys = Object.keys(obj)
for (let i = 0; i < keys.length; i++) {
defineReactive(obj, keys[i], obj[keys[i]])
}
}

Loading…
Cancel
Save