jQuery-Touch-Events icon indicating copy to clipboard operation
jQuery-Touch-Events copied to clipboard

error thrown with missing firstTap

Open kewashi opened this issue 2 years ago • 1 comments

On line 364 the variable "firstTap" is not defined when you use swipe and doubleTap on the same page. It doesn't happen all the time but appears to happen when the item swiped on was never doubleTapped on. The fix is easy - add "firstTap &&" to the if statement. I didn't bother with a pull request but I can if you prefer. Here is the patched line:

            if (delta < settings.doubletap_int && (firstTap && $(e.target).index() == firstTap.index) && delta > 100) {

kewashi avatar Oct 08 '23 17:10 kewashi

Thanks @kewashi . If you could put together a PR for this, that would be great. I can then get it merged.

Cheers! Ben.

benmajor avatar Oct 09 '23 10:10 benmajor