| Conditions | 3 |
| Total Lines | 12 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | import extensionStore from './extensions.store'; |
||
| 3 | export default function initState(Shopware) { |
||
| 4 | Shopware.State.registerModule('shopwareExtensions', extensionStore); |
||
| 5 | |||
| 6 | let languageId = Shopware.State.get('session').languageId; |
||
| 7 | Shopware.State._store.subscribe(({ type }, state) => { |
||
| 8 | if (type === 'setAdminLocale' && state.session.languageId !== '' && languageId !== state.session.languageId) { |
||
| 9 | Shopware.State.dispatch('shopwareExtensions/updateInstalledExtensions'); |
||
| 10 | Shopware.State.dispatch('shopwareExtensions/updateLicensedExtensions'); |
||
| 11 | languageId = state.session.languageId; |
||
| 12 | } |
||
| 13 | }); |
||
| 14 | } |
||
| 15 |