pokoli/ButiJS — Issue #1: variable player leaked in the global scope (src/server.js)
Author: jmgimeno
Created: 2011-11-11 11:09:46+00:00
State: open

Variable player is not local to any function so gets leaked in the global scope.

socket.on('login', function(data, fn){
player = Player.create();
player.name=data.name;
_player=player;
_players.push(player);
if(fn) fn(player);
});