Scrollify icon indicating copy to clipboard operation
Scrollify copied to clipboard

Shouldn't 'destroy' reset the 'firstLoad' flag?

Open vishnurk opened this issue 5 years ago • 1 comments

I am attempting to destroy an existing Scrollify instance before re-initializing. On re-initializing, the 'afterRender' callback is NOT triggered. Took a closer look at code and noticed this - if(firstLoad===true) { settings.afterRender(); firstLoad = false; } Shouldn't the call to destroy reset the value of firstLoad to TRUE? I do see other variables getting reset.

vishnurk avatar Aug 14 '19 19:08 vishnurk

Yes, looks like the destroy method should probably set firstLoad back to true. If you raise a PR for this, I'll be happy to merge it in.

lukehaas avatar Aug 15 '19 13:08 lukehaas