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', {
method: 'GET'
}).then((json) => {
})
.then((json) => {
const args = {
json
};
if (args.json.ok) {
connectWebSocket(args.json.token);
}
})
.catch((err) => {
console.error('WebSocket init error:', err);
});
}