Makromat
Makromat

Reputation: 1572

gestures with new hammer.js is not working like before

I just update hammer.js to newest version but after update I have error:

Uncaught TypeError: Cannot read property 'target' of undefined

because

var fieldId = event.gesture.target.id.split('_')[0];

Gestures are working but how can I handle my fieldId in new hammer.js ?

thanks for any help

Upvotes: 0

Views: 323

Answers (1)

Etheryte
Etheryte

Reputation: 25310

See the API documentation.
The target is (now) a direct descendant of the event. So you're probably looking for simply event.target.

Upvotes: 3

Related Questions