fix: websocket should not try to connect without token

This commit is contained in:
Fredrik Burmester
2024-08-21 18:43:27 +02:00
parent 7abc629a10
commit 53bb1751c2

View File

@@ -179,7 +179,7 @@ export const PlaybackProvider: React.FC<{ children: ReactNode }> = ({
}, []);
useEffect(() => {
if (!deviceId || !api || !user) return;
if (!deviceId || !api?.accessToken) return;
const url = `wss://${api?.basePath
.replace("https://", "")