diff --git a/viewporter/viewporter-tests.ts b/viewporter/viewporter-tests.ts index 35c8c2ae46..9ce0be298a 100644 --- a/viewporter/viewporter-tests.ts +++ b/viewporter/viewporter-tests.ts @@ -119,7 +119,7 @@ function test_swipey() { }).trigger(viewporter.ACTIVE ? 'viewportchange' : 'resize'); $('canvas').bind(iOS ? 'touchstart' : 'mousedown', function (e) { e.preventDefault(); - var touches = iOS ? e.originalEvent.changedTouches : [e.originalEvent]; + var touches = iOS ? (e.originalEvent).changedTouches : [e.originalEvent]; var identifier; for (var i = 0; i < touches.length; i++) { identifier = touches[i].identifier || 'mouse'; @@ -133,7 +133,7 @@ function test_swipey() { }); $('canvas').bind(iOS ? 'touchmove' : 'mousemove', function (e) { - var touches = iOS ? e.originalEvent.changedTouches : [e.originalEvent]; + var touches = iOS ? (e.originalEvent).changedTouches : [e.originalEvent]; var identifier; for (var i = 0; i < touches.length; i++) { identifier = touches[i].identifier || 'mouse'; @@ -144,7 +144,7 @@ function test_swipey() { }); $('canvas').bind(iOS ? 'touchend' : 'mouseup', function (e) { - var touches = iOS ? e.originalEvent.changedTouches : [e.originalEvent]; + var touches = iOS ? (e.originalEvent).changedTouches : [e.originalEvent]; var identifier; for (var i = 0; i < touches.length; i++) { identifier = touches[i].identifier || 'mouse';