Skip to content

Commit

Permalink
fix: invalid clone computed properties with vuex (#885)
Browse files Browse the repository at this point in the history
  • Loading branch information
sp1ker authored and Guillaume Chau committed Mar 20, 2019
1 parent 9375e61 commit 38cb9bf
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 38cb9bf

Please sign in to comment.