🐛 Fixes some linting errors
This commit is contained in:
@@ -72,7 +72,7 @@ function createWebSocket() {
|
|||||||
resetUnresponsiveCheck();
|
resetUnresponsiveCheck();
|
||||||
const message = decodeMessage(frame.data);
|
const message = decodeMessage(frame.data);
|
||||||
if (!message) return;
|
if (!message) return;
|
||||||
const [_, event, payload = undefined] = message;
|
const [, event, payload = undefined] = message;
|
||||||
if (event) listeners.get(event)?.forEach(listener => listener(payload));
|
if (event) listeners.get(event)?.forEach(listener => listener(payload));
|
||||||
};
|
};
|
||||||
ws.onerror = ev => disconnect('error', ev);
|
ws.onerror = ev => disconnect('error', ev);
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
import { WiFi } from '$lib/components/icons';
|
import { WiFi } from '$lib/components/icons';
|
||||||
import { location, socket } from '$lib/stores';
|
import { location, socket } from '$lib/stores';
|
||||||
|
|
||||||
const update = async () => {
|
const update = () => {
|
||||||
const ws = $location ? $location : window.location.host;
|
const ws = $location ? $location : window.location.host;
|
||||||
socket.init(`ws://${ws}/api/ws/events`);
|
socket.init(`ws://${ws}/api/ws/events`);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user