leaflet-velocity icon indicating copy to clipboard operation
leaflet-velocity copied to clipboard

ERROR TypeError: "this.animationBucket is undefined"

Open maihannijat opened this issue 6 years ago • 0 comments

Sometimes I get the following error: screen shot 2019-02-11 at 3 25 32 pm

But the component still works. I looked into the source and found the following:

    Windy.prototype.stop = function () {
        this.particules.splice(0, this.particules.length);
        this.animationBucket.clear();
        if (this.animationLoop) {
            clearTimeout(this.animationLoop);
            this.animationLoop = null;
        }
    };

I am not sure why this is happening but isn't it safe to check for null and then apply clear() method?

maihannijat avatar Feb 11 '19 20:02 maihannijat