Skip to content

Commit 6321a9d

Browse files
committed
Fixed pad === null error when browser reports undefined instead
1 parent f8eecb3 commit 6321a9d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

v3/src/input/gamepad/GamepadManager.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ var GamepadManager = new Class({
104104

105105
refreshPads: function (pads)
106106
{
107-
if (pads === null)
107+
if (!pads)
108108
{
109109
this.disconnectAll();
110110
}
@@ -114,7 +114,7 @@ var GamepadManager = new Class({
114114
{
115115
var pad = pads[i];
116116

117-
if (pad === null)
117+
if (!pad)
118118
{
119119
// removePad?
120120
continue;

0 commit comments

Comments
 (0)