Counter-Up2 icon indicating copy to clipboard operation
Counter-Up2 copied to clipboard

A delay of 0 causes memory leak and page crash

Open parasshah195 opened this issue 2 years ago • 0 comments

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.

parasshah195 avatar Aug 19 '22 15:08 parasshah195