Skip to content
This repository has been archived by the owner on Apr 20, 2023. It is now read-only.

Script crashes if clientX === 0 without touch screen #49

Open
perqa opened this issue Dec 3, 2013 · 0 comments
Open

Script crashes if clientX === 0 without touch screen #49

perqa opened this issue Dec 3, 2013 · 0 comments

Comments

@perqa
Copy link

perqa commented Dec 3, 2013

On row 262: eventX = event.clientX || event.touches[0].clientX;

When event.clientX === 0, it is considered false, and event.touches[0] are used instead. However, on a desktop, event.touches don't exist, so the script crashes with the message: "Uncaught TypeError: Cannot read property '0' of undefined".

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant