From 164c14b7713f0da5335bc239b18017fa551340ca Mon Sep 17 00:00:00 2001 From: Chika Date: Fri, 29 Apr 2022 22:29:35 +0300 Subject: [PATCH] stores: destruct hydration object for calculation --- stores/index.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/stores/index.js b/stores/index.js index f886725..1e18760 100644 --- a/stores/index.js +++ b/stores/index.js @@ -11,12 +11,11 @@ export function initializeStore(initialData) { if (initialData) { const { user = null, - calculationValues = {}, - calculationStatuses = {}, + calculation: { values = {}, statuses = {} }, } = initialData; _store.$user.hydrate(user); - _store.$calculation.$values.hydrate(calculationValues); - _store.$calculation.$status.hydrate(calculationStatuses); + _store.$calculation.$values.hydrate(values); + _store.$calculation.$status.hydrate(statuses); } if (typeof window === 'undefined') return _store;