Skip to content

Commit

Permalink
refactor: set should return early if original def has getter but no s…
Browse files Browse the repository at this point in the history
…etter (#7981)
  • Loading branch information
HcySunYang authored and yyx990803 committed Oct 22, 2018
1 parent c356b29 commit 6e59098
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/observer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 6e59098

Please sign in to comment.