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

Prevent unnecessary recreation of elements instance #297

Merged
merged 1 commit into from
May 25, 2022

Conversation

bmathews-stripe
Copy link
Contributor

@bmathews-stripe bmathews-stripe commented May 24, 2022

Summary & motivation

We've been unable to find the conditions to reproduce #296, but this should prevent the expected cause, which is unnecessary recreation of the elements group instance when the stripe promise resolves. At worst, this change does nothing.

Testing & documentation

Added a new test that simulates updating the element's option before the promise resolves.

Copy link
Contributor

@christopher-stripe christopher-stripe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bizarre, since I would expect the isMounted guard to work. But this change seems safe 👍

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