From ca1fab8a023656c8c120ebe67a913534e490b185 Mon Sep 17 00:00:00 2001 From: PhoenixDev - YB Date: Tue, 5 Nov 2019 11:16:27 +0200 Subject: [PATCH 1/2] PAT-1721 Issue #3748 apply hot fix for Cannot assign to read only property 'storeCode' --- core/lib/multistore.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/lib/multistore.ts b/core/lib/multistore.ts index 6c019ffcc8..dbf90e9550 100644 --- a/core/lib/multistore.ts +++ b/core/lib/multistore.ts @@ -24,9 +24,13 @@ export async function prepareStoreView (storeCode: string): Promise { } const storeViewHasChanged = !rootStore.state.storeView || rootStore.state.storeView.storeCode !== storeCode if (storeCode) { // current store code - if ((storeView = config.storeViews[storeCode])) { + const currentStoreView = config.storeViews[storeCode] + if (currentStoreView) { + storeView = Object.assign({}, currentStoreView); storeView.storeCode = storeCode rootStore.state.user.current_storecode = storeCode + } else { + console.warn(`Not found 'storeView' matching the given 'storeCode': ${storeCode}`) } } else { storeView.storeCode = config.defaultStoreCode || '' From 9236dddcc430c5c6d5f8c934056c4627383cdbf1 Mon Sep 17 00:00:00 2001 From: PhoenixDev - YB Date: Tue, 5 Nov 2019 11:23:50 +0200 Subject: [PATCH 2/2] PAT-1721 Issue #3748 add changelogs --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1ee0467df0..670d1fb9a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - disable product mutation when assigning product variant - @gibkigonzo (#3735) +- fix issue with Cannot assign to read only property 'storeCode' - @yuriboyko (#3748) ## [1.10.4] - 18.10.2019