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 value stored in element options for indexable option #860

Merged
merged 2 commits into from
Feb 28, 2023

Conversation

stockiNail
Copy link
Collaborator

The PR #801 introduced indexable options (font and color).

The current options resolution is checking if the options is indexable and if true, it stores the value of the options.

result[prop] = isObject(optDefs) && !isIndexable(prop) ? resolveObj(value, optDefs) : value;

In this way, it stores a Proxy object (or an array of Proxy) in element options, something that probably you don't want.

This PR is storing "plain" objects as element.options.

@stockiNail stockiNail added this to the 2.2.0 milestone Feb 28, 2023
@stockiNail stockiNail merged commit 7b02676 into chartjs:master Feb 28, 2023
@stockiNail
Copy link
Collaborator Author

Thank youu @kurkle

@stockiNail stockiNail deleted the fixIndexableProps branch February 28, 2023 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants