Fix uncaught error in server

This commit is contained in:
RobinLinus 2018-09-21 18:53:31 +02:00
parent abf96c0228
commit 36ec13d428
3 changed files with 3 additions and 37 deletions

View file

@ -39,7 +39,7 @@ class SnapdropServer {
}
// relay message to recipient
if (message.to) {
if (message.to && this._rooms[sender.ip]) {
const recipientId = message.to; // TODO: sanitize
const recipient = this._rooms[sender.ip][recipientId];
delete message.to;