Removed JSON parse from websocket messages

This commit is contained in:
Mitchell McCaffrey 2020-11-21 16:15:04 +11:00
parent 61d6a7bb85
commit 575b566b53

View File

@ -58,7 +58,7 @@ class Session extends EventEmitter {
constructor() {
super();
this.socket = io(process.env.REACT_APP_BROKER_URL, {
transports: ["websocket"]
transports: ["websocket"],
});
this.socket.on(
@ -232,7 +232,7 @@ class Session extends EventEmitter {
}
_handleSignal(data) {
const { from, signal } = JSON.parse(data);
const { from, signal } = data;
if (from in this.peers) {
this.peers[from].connection.signal(signal);
}