react-hammerjs icon indicating copy to clipboard operation
react-hammerjs copied to clipboard

Uncaught TypeError on load

Open DClark5218 opened this issue 9 years ago • 3 comments

Hello, when loading the page I get a type error:

screen shot 2015-10-08 at 7 49 46 pm

This references: screen shot 2015-10-08 at 7 50 00 pm

I have tried verifying this.actions is a string, but no luck. Is there any reason why I am getting this error? I would assume that it's something I just am overlooking. Thanks!

DClark5218 avatar Oct 09 '15 00:10 DClark5218

Sorry @DClark5218, not sure why that's happening. Can you put a complete example up somewhere so I can replace it?

JedWatson avatar Oct 11 '15 12:10 JedWatson

@JedWatson I appreciate it. I've been playing with some different stuff, and actually realized that the reason it's not working is because I am using React with Meteor, which is probably interfering with it.

Do you still want me to put it up on a repo so you can look at it?

DClark5218 avatar Oct 12 '15 17:10 DClark5218

After looking through this I'm realizing that if you pass in a boolean to 'touchAction' in the options prop, it will pass that boolean to line 1120 in hammer.js. By inserting a true boolean into that it will get passed into props.options on line 61, then into hammer.set in line 72. The problem is that TOUCH_ACTIONS in hammer.js only expects strings. My question then is, why is touchAction: true a valid key/value pair in the first place on your example?

ghost avatar Apr 18 '16 20:04 ghost