robinrodricks / vue3-touch-events

Simple touch events support for vue.js 3
MIT License
216 stars 27 forks source link

🐛 Fix `cancelTouchHoldTimer()` #36

Closed alecgibson closed 7 months ago

alecgibson commented 7 months ago

A recent change calls cancelTouchHoldTimer() in the unmounted hook.

However, sometimes $el.$$touchObj can be undefined (as seen in the existing check).

This then leads to an error when calling cancelTouchHoldTimer(), because it tries to access touchHoldTimer on undefined.

This change adds a check in cancelTouchHoldTimer() for this case.

robinrodricks commented 7 months ago

Thanks a lot!

robinrodricks commented 7 months ago

Published vue3-touch-events@4.1.8.