fix initWebsocket uncaught

This commit is contained in:
pa
2025-07-14 13:50:36 +09:00
committed by Natsumi
parent b6bc2cf202
commit c65cc29cd4
+5 -1
View File
@@ -26,13 +26,17 @@ export function initWebsocket() {
} }
return request('auth', { return request('auth', {
method: 'GET' method: 'GET'
}).then((json) => { })
.then((json) => {
const args = { const args = {
json json
}; };
if (args.json.ok) { if (args.json.ok) {
connectWebSocket(args.json.token); connectWebSocket(args.json.token);
} }
})
.catch((err) => {
console.error('WebSocket init error:', err);
}); });
} }