Timothy J. Baek 8 月之前
父節點
當前提交
7a1fecbdb3
共有 1 個文件被更改,包括 5 次插入1 次删除
  1. 5 1
      src/lib/components/chat/MessageInput.svelte

+ 5 - 1
src/lib/components/chat/MessageInput.svelte

@@ -766,7 +766,11 @@
 														let stream = await navigator.mediaDevices.getUserMedia({ audio: true });
 														// If the user grants the permission, proceed to show the call overlay
 
-														stream.getTracks().forEach((track) => track.stop());
+														if (stream) {
+															const tracks = stream.getTracks();
+															tracks.forEach((track) => track.stop());
+														}
+
 														stream = null;
 
 														showCallOverlay.set(true);