Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants