Skip to content

Commit

Permalink
Change catalogAttributes field to be nullable
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasTornai committed Feb 8, 2024
1 parent 9e6143e commit 5be139f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/convertSKU.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ const convertSKU = (product: BiggySearchProduct, indexingType?: IndexingType, tr

const variations = getVariations(sku, product)

const attributes = convertAttributes(sku.catalogAttributes)
const attributes = convertAttributes(sku.catalogAttributes ?? [])

const item: SearchItem & { [key: string]: any } = {
sellers,
Expand Down
2 changes: 1 addition & 1 deletion src/typings/global.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ declare global {
attributes: BiggySKUAttribute[]
sellers: BiggySeller[]
policies: BiggyPolicy[]
catalogAttributes: BiggySKUCatalogAttribute[]
catalogAttributes?: BiggySKUCatalogAttribute[]
}

interface BiggyProductExtraData {
Expand Down

0 comments on commit 5be139f

Please sign in to comment.