leaflet-timeline-slider icon indicating copy to clipboard operation
leaflet-timeline-slider copied to clipboard

BUG: that = this

Open markslawton opened this issue 2 years ago • 2 comments

Hello, there is a line in the java script:

that = this

When I run the code, the line causes an error stating: that is undefined.

I can't figure out why your demo doesn't crash at the same point and I can't figure out where "that" is defined. Any ideas?

markslawton avatar Jul 21 '22 23:07 markslawton

i didn't realize that variables don't have to be defined in javascript. the error occurs because in test mode, the browser is enforcing strict js which requires that variables be defined. i went through a defined all the undefined variables (i think there are five). it solved this problem.

markslawton avatar Jul 31 '22 15:07 markslawton

Hi! Thanks for pointing this out, sorry for the late response on my end. That's great, do you want to open a PR with that fix? Otherwise, I can also go in and just fix the non-explicit variable errors.

svitkin avatar Jul 31 '22 19:07 svitkin