Skip to content

Commit

Permalink
fix: invalid clone computed properties with vuex (vuejs#885)
Browse files Browse the repository at this point in the history
  • Loading branch information
sp1ker committed Mar 16, 2019
1 parent 3764292 commit c8154d0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/backend/hook.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,11 @@ export function installHook (target) {
for (var i in parent) {
var attrs = Object.getOwnPropertyDescriptor(parent, i)
if (attrs) {
if (attrs.hasOwnProperty('get') && attrs.get.name === 'computedGetter') {
Object.defineProperty(child, i, attrs)
continue
}

child[i] = _clone(parent[i], depth - 1)
}
}
Expand Down

0 comments on commit c8154d0

Please sign in to comment.