fix no gamepad reference

This commit is contained in:
e7d 2019-05-07 14:39:03 +02:00
parent 0d2ab6b529
commit 813df6f4ca

View File

@ -364,7 +364,7 @@ class Gamepad {
*/ */
updateStatus() { updateStatus() {
// ensure that a gamepad is currently active // ensure that a gamepad is currently active
if (!this.activeGamepadIndex) { if (null === this.activeGamepadIndex) {
return; return;
} }
@ -443,7 +443,7 @@ class Gamepad {
*/ */
changeGamepadColor(gamepadColor) { changeGamepadColor(gamepadColor) {
// ensure that a gamepad is currently active // ensure that a gamepad is currently active
if (!this.activeGamepadIndex) { if (null === this.activeGamepadIndex) {
return; return;
} }
@ -485,7 +485,7 @@ class Gamepad {
*/ */
changeZoom(zoomLevel) { changeZoom(zoomLevel) {
// ensure that a gamepad is currently active // ensure that a gamepad is currently active
if (!this.activeGamepadIndex) { if (null === this.activeGamepadIndex) {
return; return;
} }
@ -530,7 +530,7 @@ class Gamepad {
*/ */
toggleDebug() { toggleDebug() {
// ensure that a gamepad is currently active // ensure that a gamepad is currently active
if (!this.activeGamepadIndex) { if (null === this.activeGamepadIndex) {
return; return;
} }