mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 23:46:14 -04:00
Made the router a little safer.
This commit is contained in:
parent
6e09517d55
commit
74b96aa774
1 changed files with 6 additions and 1 deletions
|
@ -63,8 +63,13 @@ exports.setSocketIO = function(_socket)
|
||||||
{
|
{
|
||||||
console.error(message);
|
console.error(message);
|
||||||
|
|
||||||
|
//check if component is registered in the components array
|
||||||
|
if(components[message.component])
|
||||||
|
{
|
||||||
components[message.component].handleMessage(client, message);
|
components[message.component].handleMessage(client, message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw "Can't route the message:" + JSON.stringify(message);
|
throw "Can't route the message:" + JSON.stringify(message);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue