fixed removeGamepad method
This commit is contained in:
parent
0a8edf3298
commit
60d0921fc3
@ -105,7 +105,10 @@ class Gamepad {
|
|||||||
}
|
}
|
||||||
|
|
||||||
removeGamepad(gamepadIndex) {
|
removeGamepad(gamepadIndex) {
|
||||||
if (!gamepadIndex || gamepadIndex === this.activeGamepadIndex) {
|
if ('undefined' === typeof gamepadIndex) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (gamepadIndex === this.activeGamepadIndex) {
|
||||||
this.activeGamepadIndex = null;
|
this.activeGamepadIndex = null;
|
||||||
this.$gamepad.empty();
|
this.$gamepad.empty();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user