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 updating plugin options #5144

Merged
merged 1 commit into from
Jan 13, 2018

Conversation

simonbrunel
Copy link
Member

Cached plugin descriptors hold a reference on the plugin options, which break if the plugin options object is replaced. That case happens when the user updates the plugin options with a new object, but also since the new config update logic (#4198) that now always clones the plugin options. The fix consists in explicitly invalidating that cache before updating the chart.

Relates to #5111

@simonbrunel simonbrunel added this to the Version 2.8 milestone Jan 13, 2018
@simonbrunel simonbrunel requested a review from etimberg January 13, 2018 11:50
Cached plugin descriptors hold a reference on the plugin options, which break if the plugin options object is replaced. That case happens when the user updates the plugin options with a new object, but also since the new config update logic (chartjs#4198) that now always clones the plugin options. The fix consists in explicitly invalidating that cache before updating the chart.
@simonbrunel simonbrunel force-pushed the fix/plugin-options-update branch from b77a7cc to 49d7e8f Compare January 13, 2018 11:51
@etimberg etimberg merged commit 2d7f0a4 into chartjs:master Jan 13, 2018
@simonbrunel simonbrunel deleted the fix/plugin-options-update branch January 13, 2018 13:24
exwm pushed a commit to exwm/Chart.js that referenced this pull request Apr 30, 2021
Cached plugin descriptors hold a reference on the plugin options, which break if the plugin options object is replaced. That case happens when the user updates the plugin options with a new object, but also since the new config update logic (chartjs#4198) that now always clones the plugin options. The fix consists in explicitly invalidating that cache before updating the chart.
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