diff --git a/src/core/observer/index.js b/src/core/observer/index.js index 86a21f9e4f2..1c5f98b63a6 100644 --- a/src/core/observer/index.js +++ b/src/core/observer/index.js @@ -61,7 +61,7 @@ export class Observer { walk (obj: Object) { const keys = Object.keys(obj) for (let i = 0; i < keys.length; i++) { - defineReactive(obj, keys[i], obj[keys[i]]) + defineReactive(obj, keys[i]) } } @@ -145,6 +145,9 @@ export function defineReactive ( // cater for pre-defined getter/setters const getter = property && property.get + if (!getter && arguments.length <= 2) { + val = obj[key] + } const setter = property && property.set let childOb = !shallow && observe(val)