mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-20 20:29:06 +00:00
fix: prevent unattended reloading on transcript page (#410)
This commit is contained in:
@@ -13,7 +13,7 @@ const useWebRTC = (
|
||||
const api = useApi();
|
||||
|
||||
useEffect(() => {
|
||||
if (!stream || !transcriptId) {
|
||||
if (!stream || !transcriptId || !api) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ const useWebRTC = (
|
||||
return () => {
|
||||
p.destroy();
|
||||
};
|
||||
}, [stream, transcriptId]);
|
||||
}, [stream, transcriptId, !api]);
|
||||
|
||||
return peer;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user