Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fix v-model not working in BaseRadioButton - @lukeromanowicz (#4035)
- add disconnect and sync options for clear/cart - @gibkigonzo (#4062)
- Fix current token invalidation with refresh token - @gibkigonzo (#3928, #3620, #3626)
- Disable overriding `route`, `config`, `storeView`, `version` state in __INITIAL_STATE__ - @gibkigonzo (pr#4095)

## [1.10.5] - 28.11.2019

Expand Down
4 changes: 3 additions & 1 deletion core/client-entry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { AsyncDataLoader } from './lib/async-data-loader'
import { Logger } from '@vue-storefront/core/lib/logger'
import globalConfig from 'config'
import { RouterManager } from './lib/router-manager';
import omit from 'lodash-es/omit'
declare var window: any

const invokeClientEntry = async () => {
Expand All @@ -22,7 +23,8 @@ const invokeClientEntry = async () => {
const { app, router, store } = await createApp(null, dynamicRuntimeConfig, storeCode)

if (window.__INITIAL_STATE__) {
store.replaceState(Object.assign({}, store.state, window.__INITIAL_STATE__, { config: globalConfig }))
const initialState = omit(window.__INITIAL_STATE__, ['storeView', 'config', 'version', 'route'])
store.replaceState(Object.assign({}, store.state, initialState, { config: globalConfig }))
}

await store.dispatch('url/registerDynamicRoutes')
Expand Down