From 38cb9bfada5775685a8256df0fd997ff446cc99b Mon Sep 17 00:00:00 2001 From: Sp1ker Date: Sat, 16 Mar 2019 15:30:29 +0300 Subject: [PATCH] fix: invalid clone computed properties with vuex (#885) --- src/backend/hook.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/backend/hook.js b/src/backend/hook.js index 9c8a2c3f7..1705a8ad9 100644 --- a/src/backend/hook.js +++ b/src/backend/hook.js @@ -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) } }