From 0ef21a5386edfa8f1a532264ea469d8430d2d402 Mon Sep 17 00:00:00 2001 From: zepumph Date: Tue, 16 Feb 2021 19:28:13 -0900 Subject: [PATCH] support a null pointer to check isTouchLike, https://github.com/phetsims/scenery/issues/1156 --- js/HomeScreenButton.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/HomeScreenButton.js b/js/HomeScreenButton.js index 4f42f8f4..18ab7c60 100644 --- a/js/HomeScreenButton.js +++ b/js/HomeScreenButton.js @@ -170,7 +170,7 @@ class HomeScreenButton extends VBox { // touchover, in which case we need to guard on touchdown since we don't want to double fire for touchover and // touchdown, see https://github.com/phetsims/joist/issues/624 const buttonDown = () => { - if ( isSelectedProperty.value && ( !( fireListener.pointer.isTouchLike() ) || buttonWasAlreadySelected ) ) { + if ( isSelectedProperty.value && ( !( fireListener.pointer && fireListener.pointer.isTouchLike() ) || buttonWasAlreadySelected ) ) { homeScreenModel.screenProperty.value = screen; } else {