Skip to content

Commit

Permalink
fix: Adds check for changedTouches (google#5869)
Browse files Browse the repository at this point in the history
  • Loading branch information
alschmiedt authored Jan 25, 2022
1 parent 5d7c890 commit 3f4f505
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/touch.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 3f4f505

Please sign in to comment.