diff --git a/src/node/handler/SocketIORouter.js b/src/node/handler/SocketIORouter.js index e6120d366..1a53602dc 100644 --- a/src/node/handler/SocketIORouter.js +++ b/src/node/handler/SocketIORouter.js @@ -39,11 +39,13 @@ let io; * adds a component */ exports.addComponent = (moduleName, module) => { - // save the component + if (module == null) return exports.deleteComponent(moduleName); components[moduleName] = module; module.setSocketIO(io); }; +exports.deleteComponent = (moduleName) => { delete components[moduleName]; }; + /** * sets the socket.io and adds event functions for routing */