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

A delay of 0 causes memory leak and page crash #19

Open
parasshah195 opened this issue Aug 19, 2022 · 0 comments
Open

A delay of 0 causes memory leak and page crash #19

parasshah195 opened this issue Aug 19, 2022 · 0 comments

Comments

@parasshah195
Copy link

On assuming that delay option means the initial time taken to start the counter, I changed it to 0 (not wanting any delay) after which the page started crashing every time the counter element came into view.

Realized that it was happening because the code does a division by delay here, meaning a division by 0 would cause a memory leak.

Ideally, the code should check and auto-assign the delay to a minimum of 1. And also, perhaps more clear instructions about the delay option in the readme would be helpful.

Thanks for creating this library.

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

No branches or pull requests

1 participant