Skip to content

Commit 7ffe51a

Browse files
sp1kerAkryum
authored andcommitted
fix: invalid clone computed properties with vuex (#885) (#904)
1 parent 9375e61 commit 7ffe51a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/backend/hook.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,11 @@ export function installHook (target) {
233233
for (var i in parent) {
234234
var attrs = Object.getOwnPropertyDescriptor(parent, i)
235235
if (attrs) {
236+
if (attrs.hasOwnProperty('get') && attrs.get.name === 'computedGetter') {
237+
Object.defineProperty(child, i, attrs)
238+
continue
239+
}
240+
236241
child[i] = _clone(parent[i], depth - 1)
237242
}
238243
}

0 commit comments

Comments
 (0)