VincentGarreau / particles.js

A lightweight JavaScript library for creating particles
https://vincentgarreau.com/particles.js/
MIT License
29.08k stars 4.83k forks source link

Fix crash when re-instantiating particles after destroy #407

Open FirstVertex opened 4 years ago

FirstVertex commented 4 years ago

Getting a crash when I call destroy, then use the same element to create Particles again. pJSDom should be set to empty array, instead of null, to prevent null reference on 2nd time through on line 1517 at pJSDom.push(new pJS(tag_id, params));