Skip to content

Commit

Permalink
support a null pointer to check isTouchLike, phetsims/scenery#1156
Browse files Browse the repository at this point in the history
  • Loading branch information
zepumph committed Mar 3, 2021
1 parent b3c1e1b commit 0ef21a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/HomeScreenButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 0ef21a5

Please sign in to comment.