Skip to content
This repository has been archived by the owner on Jan 23, 2025. It is now read-only.

added error checks #281

Closed
wants to merge 1 commit into from
Closed

added error checks #281

wants to merge 1 commit into from

Conversation

levos-snr
Copy link

//ensure that these arrays are not undefined before calling the flatMap method.
const intervals = Array.from(new Set(products?.flatMap(product => product?.prices?.map(price => price?.interval))))
// To prevent error(undefined (reading 'length')),
!products || products.length === 0

Copy link

vercel bot commented Jan 2, 2024

@levos-snr is attempting to deploy a commit to the Vercel Solutions Team on Vercel.

A member of the Team first needs to authorize it.

@leerob
Copy link
Member

leerob commented Feb 12, 2024

#278

@leerob leerob closed this Feb 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants