@faststore/api 1.12.20 → 1.12.21
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.
- package/CHANGELOG.md +9 -0
- package/dist/api.cjs.development.js +4 -2
- package/dist/api.cjs.development.js.map +1 -1
- package/dist/api.cjs.production.min.js +1 -1
- package/dist/api.cjs.production.min.js.map +1 -1
- package/dist/api.esm.js +4 -2
- package/dist/api.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/platforms/vtex/resolvers/validateSession.ts +3 -2
package/dist/api.esm.js
CHANGED
|
@@ -1247,10 +1247,12 @@ const validateSession = async (_, {
|
|
|
1247
1247
|
const postalCode = String((_oldSession$postalCod = oldSession.postalCode) != null ? _oldSession$postalCod : '').replace(/\D/g, '');
|
|
1248
1248
|
const country = (_oldSession$country = oldSession.country) != null ? _oldSession$country : '';
|
|
1249
1249
|
const params = new URLSearchParams(search);
|
|
1250
|
-
|
|
1250
|
+
const salesChannel = (_params$get = params.get('sc')) != null ? _params$get : channel.salesChannel;
|
|
1251
|
+
params.set('sc', salesChannel);
|
|
1251
1252
|
const [regionData, sessionData] = await Promise.all([postalCode ? clients.commerce.checkout.region({
|
|
1252
1253
|
postalCode,
|
|
1253
|
-
country
|
|
1254
|
+
country,
|
|
1255
|
+
salesChannel
|
|
1254
1256
|
}) : Promise.resolve(null), clients.commerce.session(params.toString()).catch(() => null)]);
|
|
1255
1257
|
const profile = (_sessionData$namespac = sessionData == null ? void 0 : sessionData.namespaces.profile) != null ? _sessionData$namespac : null;
|
|
1256
1258
|
const store = (_sessionData$namespac2 = sessionData == null ? void 0 : sessionData.namespaces.store) != null ? _sessionData$namespac2 : null;
|