@gem-sdk/core 1.10.35 → 1.10.39

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.
@@ -34,7 +34,7 @@ const styles = (strings, ...keys)=>{
34
34
  for(const attr in styles){
35
35
  if (Object.hasOwnProperty.call(styles, attr)) {
36
36
  const val = styles[attr];
37
- if (val !== undefined) styleArr.push(`${attr}:${val}`);
37
+ if (val !== undefined && val !== false) styleArr.push(`${attr}:${val}`);
38
38
  }
39
39
  }
40
40
  return styleArr.join(';');
@@ -9,9 +9,11 @@ var query = require('../../helpers/query.js');
9
9
  const useCollectionQuery = (args, options)=>{
10
10
  const fetcher = useFetchHandle.useFetchHandle();
11
11
  const isSample = shop.useIsSampleProduct();
12
+ const isStorefront = shop.useIsStorefrontProduct();
12
13
  return useSWR(args ? query.generateCollectionQueryKey({
13
14
  ...args,
14
- isSample
15
+ isSample,
16
+ isStorefront
15
17
  }) : null, ([, arg])=>{
16
18
  return getCollection.getCollection(fetcher, arg);
17
19
  }, options);
@@ -32,7 +32,7 @@ const styles = (strings, ...keys)=>{
32
32
  for(const attr in styles){
33
33
  if (Object.hasOwnProperty.call(styles, attr)) {
34
34
  const val = styles[attr];
35
- if (val !== undefined) styleArr.push(`${attr}:${val}`);
35
+ if (val !== undefined && val !== false) styleArr.push(`${attr}:${val}`);
36
36
  }
37
37
  }
38
38
  return styleArr.join(';');
@@ -1,15 +1,17 @@
1
1
  import useSWR from 'swr';
2
2
  import { getCollection } from '../../helpers/queries/get-collection.js';
3
- import { useIsSampleProduct } from '../shop.js';
3
+ import { useIsSampleProduct, useIsStorefrontProduct } from '../shop.js';
4
4
  import { useFetchHandle } from '../useFetchHandle.js';
5
5
  import { generateCollectionQueryKey } from '../../helpers/query.js';
6
6
 
7
7
  const useCollectionQuery = (args, options)=>{
8
8
  const fetcher = useFetchHandle();
9
9
  const isSample = useIsSampleProduct();
10
+ const isStorefront = useIsStorefrontProduct();
10
11
  return useSWR(args ? generateCollectionQueryKey({
11
12
  ...args,
12
- isSample
13
+ isSample,
14
+ isStorefront
13
15
  }) : null, ([, arg])=>{
14
16
  return getCollection(fetcher, arg);
15
17
  }, options);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/core",
3
- "version": "1.10.35",
3
+ "version": "1.10.39",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",