Skip to content

Prevent opts() from exposing private object - #1920

Closed
aweebit wants to merge 1 commit into
tj:developfrom
aweebit:opts-return
Closed

aweebit wants to merge 1 commit into
tj:developfrom
aweebit:opts-return

Conversation

@aweebit

@aweebit aweebit commented Jul 30, 2023 •

Copy link
Copy Markdown
Contributor

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