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 opts() from exposing private object #1920

Closed
wants to merge 1 commit into from

Conversation

aweebit
Copy link
Contributor

@aweebit aweebit commented Jul 30, 2023

opts() now returns the private _optionValues object, making changes to it such as property deletion possible, but I don't think they are supposed to be possible. For example, deleting a property would lead to a weird state in which a source is defined in _optionValueSources for an option value that does not exist anymore.

The PR fixes this by returning a shallow clone of the object.

@aweebit aweebit changed the title Prevent opts() from exposing private object Prevent opts() from exposing private object Jul 30, 2023
@aweebit aweebit closed this Jul 30, 2023
@aweebit aweebit deleted the opts-return branch July 30, 2023 04:36
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.

1 participant