Skip to content

Commit

Permalink
Merge pull request #3679 from andrzejewsky/bugfix/3674
Browse files Browse the repository at this point in the history
Allow to have access to the storeCode inside metaInfo()
  • Loading branch information
patzick committed Oct 3, 2019
2 parents 6f5dba3 + e524360 commit e865c10
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Removed infinite loop when changing checkbox in shipping details - @gibkigonzo (#3656)
- Fixed displaying single order in the profile - @andrzejewsky (#3663)
- Make microcart ui consistent for all types of products - @gibkigonzo (#3673)
- Fixed missing storeCode in metaInfo - @andrzejewsky (#3674)
- Removed showing popup when you have just logged out - @andrzejewsky (#3680)

### Changed / Improved
Expand Down
6 changes: 5 additions & 1 deletion core/helpers/initialStateFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ const initialStateFactory = (defaultState) => {
// storing default values for the fields that will be set in createApp
const defaultFields = pick(defaultState, ['version', 'config', '__DEMO_MODE__', 'storeView'])

const createInitialState = (currentState) => ({ ...cloneDeep(currentState), ...defaultFields })
const createInitialState = (currentState) => ({
...cloneDeep(currentState),
...defaultFields,
storeView: { storeCode: currentState.storeView.storeCode }
})

return { createInitialState }
}
Expand Down

0 comments on commit e865c10

Please sign in to comment.