From 7c0d9a8c5a40833649db82c80805e3b4dd050c23 Mon Sep 17 00:00:00 2001 From: alschmiedt Date: Tue, 11 Jan 2022 15:48:36 -0800 Subject: [PATCH] fix: Adds check for changedTouches --- core/touch.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/touch.js b/core/touch.js index b977d05af2c..c4d92a221c8 100644 --- a/core/touch.js +++ b/core/touch.js @@ -212,7 +212,7 @@ exports.checkTouchIdentifier = checkTouchIdentifier; * @alias Blockly.Touch.setClientFromTouch */ const setClientFromTouch = function(e) { - if (utilsString.startsWith(e.type, 'touch')) { + if (utilsString.startsWith(e.type, 'touch') && e.changedTouches) { // Map the touch event's properties to the event. const touchPoint = e.changedTouches[0]; e.clientX = touchPoint.clientX;