@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faststore/api",
3
- "version": "1.12.20",
3
+ "version": "1.12.21",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -46,5 +46,5 @@
46
46
  "peerDependencies": {
47
47
  "graphql": "^15.6.0"
48
48
  },
49
- "gitHead": "829d49bfc8d8ce7e37a0fdd9233ac68c8a3cf7b9"
49
+ "gitHead": "7546e4da77bd1f9a4facaafea854110a8a94c372"
50
50
  }
@@ -17,12 +17,13 @@ export const validateSession = async (
17
17
  const country = oldSession.country ?? ''
18
18
 
19
19
  const params = new URLSearchParams(search)
20
+ const salesChannel = params.get('sc') ?? channel.salesChannel
20
21
 
21
- params.set('sc', params.get('sc') ?? channel.salesChannel)
22
+ params.set('sc', salesChannel)
22
23
 
23
24
  const [regionData, sessionData] = await Promise.all([
24
25
  postalCode
25
- ? clients.commerce.checkout.region({ postalCode, country })
26
+ ? clients.commerce.checkout.region({ postalCode, country, salesChannel })
26
27
  : Promise.resolve(null),
27
28
  clients.commerce.session(params.toString()).catch(() => null),
28
29
  ])