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

Another error occurs if donut chart.destroy() is called ~100ms after chart.unload() #3615

Open
slaweet opened this issue Jan 24, 2024 · 1 comment
Labels

Comments

@slaweet
Copy link

slaweet commented Jan 24, 2024

Description

@netil thank you very much for a quick fixing of #3614.

Another error occurs in the same scenario if I decrease the timeout from 500ms to 100ms.

Steps to check or reproduce

I've updated the timeout in the reproduction with nightly build of billboard: https://codesandbox.io/p/sandbox/billboard-error-after-destroy-forked-pw4xyq
it throws

TypeError
_$el is null
redraw
https://pw4xyq.csb.app/node_modules/billboard.js/dist/billboard.pkgd.js:31562:14
unload/<
https://pw4xyq.csb.app/node_modules/billboard.js/dist/billboard.pkgd.js:38571:10
end
https://pw4xyq.csb.app/node_modules/billboard.js/dist/billboard.pkgd.js:23668:21
call
https://pw4xyq.csb.app/node_modules/billboard.js/dist/billboard.pkgd.js:21136:72
tick
https://pw4xyq.csb.app/node_modules/billboard.js/dist/billboard.pkgd.js:22093:15
timerFlush
https://pw4xyq.csb.app/node_modules/billboard.js/dist/billboard.pkgd.js:21900:48
wake
https://pw4xyq.csb.app/node_modules/billboard.js/dist/billboard.pkgd.js:21909:5
@netil
Copy link
Member

netil commented Jan 24, 2024

@slaweet, thanks again.
Basically, we recommend use in defensive approach. Usually calling other task which previous task haven't finished, eventually will make unexpected error.

For example, when calling some async load call, call next command when load task is done using load's done option.
Aside of comment, I'll look for preventing this.

@netil netil added the pending label Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants