Merge pull request #112 from thecodingmachine/debug/improve_message

More detailed error log to debug disconnect issue
This commit is contained in:
David Négrier 2020-05-13 22:24:53 +02:00 committed by GitHub
commit cf4fa8677f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,6 +6,7 @@ export class Message {
constructor(data: any) {
if (!data.userId || !data.roomId) {
console.error("Got invalid message", data);
throw Error("userId or roomId cannot be null");
}
this.userId = data.userId;