Skip to content

Commit

Permalink
Apparently I've forgotten that JS is smarter than me.
Browse files Browse the repository at this point in the history
  • Loading branch information
petemounce committed Mar 22, 2012
1 parent 18625f5 commit 3e26929
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion public/js/game/kaboom.game.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ KaboomGame.prototype = {
findPlayer: function(player) {
console.log("finding player in %s", JSON.stringify(this.players));
for (var i = 0; i < this.players.length; i++) {
if (this.players[i] != null && this.players[i].name == player.name) {
if (this.players[i] && this.players[i].name == player.name) {
return (this.players[i]);
}
}
Expand Down

0 comments on commit 3e26929

Please sign in to comment.