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

Throw error when CustomCheckoutContext value is null #444

Merged
merged 1 commit into from
Sep 12, 2023

Conversation

pololi-stripe
Copy link
Contributor

@pololi-stripe pololi-stripe commented Sep 12, 2023

Summary & motivation

Throw error when CustomCheckoutContext value is null

  • we don't render any children until the context is set. So as long as the app is wrapped in CustomCheckoutProvider, users should not hit this error.
  • This is to make it easier for TS users to destruct the object without worrying about nullable cases

API review

Copy this template or link to an API review issue.

Testing & documentation

Tested in storybook
CleanShot 2023-09-12 at 12 03 29@2x

- we don't render any children until the context is set. So as long as
  the app is wrapped in CustomCheckoutProvider, users should not hit
  this error.
- This is to make it easier for TS users to destruct the object without
  worring about nullable cases
@pololi-stripe pololi-stripe merged commit 17df531 into master Sep 12, 2023
@pololi-stripe pololi-stripe deleted the pololi/change-custom-checkout branch September 12, 2023 19:41
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.

None yet

3 participants