Skip to content

Commit 2150bda

Browse files
sp1keriksim
authored and
iksim
committed
fix: invalid clone computed properties with vuex (vuejs#885) (vuejs#904)
1 parent 512fd1f commit 2150bda

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)