Made the router a little safer.

This commit is contained in:
Hans Pinckaers 2011-06-21 21:19:48 +02:00
parent 6e09517d55
commit 74b96aa774

View file

@ -63,7 +63,12 @@ exports.setSocketIO = function(_socket)
{ {
console.error(message); console.error(message);
components[message.component].handleMessage(client, message); //check if component is registered in the components array
if(components[message.component])
{
components[message.component].handleMessage(client, message);
}
} }
else else
{ {