mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-07 06:56:04 +02:00
fix initWebsocket uncaught
This commit is contained in:
@@ -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);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user