CreateJS / EaselJS

The Easel Javascript library provides a full, hierarchical display list, a core interaction model, and helper classes to make working with the HTML5 Canvas element much easier.
http://createjs.com/
MIT License
8.13k stars 1.97k forks source link

Prevent error on Touch.disable(stage) #1042

Closed owendwyer closed 2 years ago

owendwyer commented 4 years ago

If the browser doesn't support touch events, then calling Touch.disable causes an error. The error is because stage.touch is never initiated in Touch.enable and so trying to delete it causes an error. This is fixed by adding a check for stage.touch in Touch.disable.