@faststore/api 1.12.6 → 1.12.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.
@@ -12,7 +12,7 @@ export interface ProductSearchResult {
12
12
  query: string;
13
13
  operator: 'and' | 'or';
14
14
  fuzzy: string;
15
- correction: Correction;
15
+ correction?: Correction;
16
16
  }
17
17
  interface Correction {
18
18
  misspelled: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faststore/api",
3
- "version": "1.12.6",
3
+ "version": "1.12.7",
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": "74bbbc8c3573be89754ccb50b0d1bc135b332ca9"
49
+ "gitHead": "864263fb8c6a7e3a49d0c724039545f9759c8559"
50
50
  }
@@ -12,7 +12,7 @@ export interface ProductSearchResult {
12
12
  query: string
13
13
  operator: 'and' | 'or'
14
14
  fuzzy: string
15
- correction: Correction
15
+ correction?: Correction
16
16
  }
17
17
 
18
18
  interface Correction {
@@ -57,7 +57,7 @@ export const StoreSearchResult: Record<string, Resolver<Root>> = {
57
57
  sp.sendEvent({
58
58
  type: 'search.query',
59
59
  text: searchArgs.query,
60
- misspelled: products.correction.misspelled,
60
+ misspelled: products.correction?.misspelled ?? false,
61
61
  match: products.recordsFiltered,
62
62
  operator: products.operator,
63
63
  }).catch(console.error)