basklee-svelte 0.9.6 → 0.9.7

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": "basklee-svelte",
3
- "version": "0.9.6",
3
+ "version": "0.9.7",
4
4
  "description": "SvelteKit 2 storefront for your Basklee marketplace: setup CLI, server API gateway, typed store and ready-made catalog, cart, checkout and account components in English, Russian and Spanish, plus an Android app build. Powered by Basklee: https://basklee.com",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -53,8 +53,12 @@ type SellerQueryValue = string | null | undefined | readonly (string | null)[];
53
53
 
54
54
  const sellerLocationKeys = ['name', 'rating', 'cats', 'sort', 'page'];
55
55
 
56
- function firstSellerQueryValue(value: SellerQueryValue) {
57
- return Array.isArray(value) ? value[0] : (value as string | null | undefined);
56
+ function firstSellerQueryValue(
57
+ value: SellerQueryValue,
58
+ ): string | null | undefined {
59
+ return typeof value === 'string' || value === null || value === undefined
60
+ ? value
61
+ : value[0];
58
62
  }
59
63
 
60
64
  function positiveSellerQueryNumber(value: string | null | undefined) {