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

fix: Deep copy options used by dropdown fields #6425

Merged
merged 1 commit into from
Sep 13, 2022
Merged

Conversation

NeilFraser
Copy link
Contributor

Previously the options data structure passed to the dropdown constructor was sometimes copied (in the case of prefix/suffix trimming), but other times it was merely referenced. This meant if options data was used to create one dropdown, then the options data was modified and a second dropdown was created, the first dropdown's options would mysteriously change as well.

This uncovered a broken test that was only passing because of a side effect of the dropdown option data getting modified.

This uncovered a broken test that was only passing because of a side effect of the dropdown option data getting modified.
@NeilFraser NeilFraser merged commit 05b221b into develop Sep 13, 2022
@NeilFraser NeilFraser deleted the fraser-deep-copy2 branch September 13, 2022 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants