Browse Source

refactor: set should return early if original def has getter but no setter (#7981)

dev
HcySunYang 6 years ago
committed by Evan You
parent
commit
6e5909869c
  1. 2
      src/core/observer/index.js

2
src/core/observer/index.js

@ -179,6 +179,8 @@ export function defineReactive (
if (process.env.NODE_ENV !== 'production' && customSetter) {
customSetter()
}
// #7981: for accessor properties without setter
if (getter && !setter) return
if (setter) {
setter.call(obj, newVal)
} else {

Loading…
Cancel
Save