fix initWebsocket uncaught

This commit is contained in:
pa
2025-07-14 13:50:36 +09:00
committed by Natsumi
parent b6bc2cf202
commit c65cc29cd4

View File

@@ -26,14 +26,18 @@ export function initWebsocket() {
}
return request('auth', {
method: 'GET'
}).then((json) => {
const args = {
json
};
if (args.json.ok) {
connectWebSocket(args.json.token);
}
});
})
.then((json) => {
const args = {
json
};
if (args.json.ok) {
connectWebSocket(args.json.token);
}
})
.catch((err) => {
console.error('WebSocket init error:', err);
});
}
/**