Counter-Up2
Counter-Up2 copied to clipboard
A delay of 0 causes memory leak and page crash
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.