fix broken things

votekiss
easrng 2022-02-18 17:13:49 -05:00
parent a514241bee
commit 1bf13d9776
3 changed files with 5 additions and 7 deletions

View File

@ -386,7 +386,7 @@ export const logEventToChat = async (event) => {
event.colour,
document.createTextNode("left")
);
for(let kissed in kisses) delete kisses[kissed][user]
for (let kissed in kisses) delete kisses[kissed][user];
break;
}
case "ChatMessage": {
@ -475,7 +475,7 @@ const beep = () => {
let viewers = [];
export const updateViewerList = (viewers) => {
export const updateViewerList = (_viewers) => {
viewers = _viewers;
const listContainer = document.querySelector("#viewer-list");

View File

@ -11,7 +11,6 @@ export default class ReconnectingWebSocket {
this._lastConnect = 0;
this._socket = null;
this._unsent = [];
this._connect(true);
}
_connect(first) {
if (this._socket)
@ -26,9 +25,9 @@ export default class ReconnectingWebSocket {
}
this._socket.addEventListener("close", () => this._reconnect());
this._socket.addEventListener("error", () => this._reconnect());
this._socket.addEventListener("message", ({ data }) =>
this._eventTarget.dispatchEvent(new MessageEvent("message", { data }))
);
this._socket.addEventListener("message", ({ data }) => {
this._eventTarget.dispatchEvent(new MessageEvent("message", { data }));
});
this._socket.addEventListener("open", (e) => {
if (first) this._eventTarget.dispatchEvent(new Event("open"));
if (this._reconnecting)

View File

@ -71,7 +71,6 @@ const setupIncomingEvents = (video, socket) => {
socket.addEventListener("message", async (messageEvent) => {
try {
const event = JSON.parse(messageEvent.data);
if (!event.reflected) {
switch (event.op) {
case "SetPlaying":