From fef2f9def9cafd6cdd879fe1b08708dec9472d7f Mon Sep 17 00:00:00 2001 From: alschmiedt Date: Tue, 25 Jan 2022 14:50:00 -0800 Subject: [PATCH] fix: Adds check for changedTouches (#5869) --- core/touch.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/touch.js b/core/touch.js index b0eb0b347bf..53f3440d08c 100644 --- a/core/touch.js +++ b/core/touch.js @@ -217,7 +217,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;