jQuery-Touch-Events
jQuery-Touch-Events copied to clipboard
error thrown with missing firstTap
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) {
Thanks @kewashi . If you could put together a PR for this, that would be great. I can then get it merged.
Cheers! Ben.