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: avoid errors when executing unfinished operations after dispose #1031

Merged
merged 3 commits into from
Dec 20, 2023

Conversation

yechunxi
Copy link
Contributor

A chart is performing certain operations. After the operation, it will be refreshed and calling flush. At this time, the instance has been disposed, an error will appear. such this issue and in react native echart issue

@zhiqingchen
Copy link

@plainheart Can you review this pr?

Copy link
Collaborator

@plainheart plainheart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution! I would prefer adding a flag _disposed and checking it before invoking the instance methods, as ECharts does.

https://github.com/apache/echarts/blob/master/src/core/echarts.ts#L1168-L1185

@yechunxi yechunxi marked this pull request as draft December 19, 2023 08:32
@yechunxi yechunxi requested a review from plainheart December 19, 2023 09:39
@yechunxi yechunxi marked this pull request as ready for review December 19, 2023 09:39
@yechunxi
Copy link
Contributor Author

Thanks for your contribution! I would prefer adding a flag _disposed and checking it before invoking the instance methods, as ECharts does.

https://github.com/apache/echarts/blob/master/src/core/echarts.ts#L1168-L1185

Thank you, your suggestion will be better. Based on the suggestions you gave me, I implemented it again. I hope to review it

@yechunxi yechunxi closed this Dec 19, 2023
@yechunxi yechunxi reopened this Dec 19, 2023
@AkshayPathakMLF
Copy link

@plainheart Are you able to release a new version since this has been merged in?

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.

TypeError: Cannot read properties of null (reading 'start')
4 participants