@vue-storefront/nuxt 2.4.2 → 2.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -27,8 +27,13 @@ const i18nCookiesPlugin = ({ $cookies }) => {
27
27
  expires: new Date(new Date().setFullYear(new Date().getFullYear() + 1)) // Year from now
28
28
  };
29
29
 
30
- !$cookies.get(VSF_CURRENCY_COOKIE) && $cookies.set(VSF_CURRENCY_COOKIE, settings.currency, cookieOptions);
31
- !$cookies.get(VSF_COUNTRY_COOKIE) && $cookies.set(VSF_COUNTRY_COOKIE, settings.country, cookieOptions);
30
+ const cookieNames = {
31
+ currency: i18n.cookies?.currencyCookieName || VSF_CURRENCY_COOKIE,
32
+ country: i18n.cookies?.countryCookieName || VSF_COUNTRY_COOKIE
33
+ }
34
+
35
+ !$cookies.get(cookieNames.currency) && $cookies.set(cookieNames.currency, settings.currency, cookieOptions);
36
+ !$cookies.get(cookieNames.country) && $cookies.set(cookieNames.country, settings.country, cookieOptions);
32
37
  };
33
38
 
34
- export default i18nCookiesPlugin;
39
+ export default i18nCookiesPlugin;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue-storefront/nuxt",
3
- "version": "2.4.2",
3
+ "version": "2.4.3",
4
4
  "description": "",
5
5
  "main": "lib/module.js",
6
6
  "scripts": {