Skip to content

Commit 67d6d7b

Browse files
committed
Tweaks
1 parent 70b9d20 commit 67d6d7b

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

src/examples/common/src/CameraView.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ function CameraView({ stream, onVideoElementReady, handsData, faceData, bodyData
393393
cancelAnimationFrame(animationFrameIdRef.current);
394394
if (videoElement.srcObject) {
395395
const tracks = videoElement.srcObject.getTracks();
396-
tracks.forEach((track) => track.stop());
396+
tracks.forEach((track) => { track.stop() });
397397
videoElement.srcObject = null;
398398
if (typeof onVideoElementReady === 'function') {
399399
onVideoElementReady(null);

src/examples/common/src/MicrophoneView.jsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ function MicrophoneView({ mic }) {
103103
);
104104
// Ensure targetBarWidth is not NaN or undefined if rms is weird
105105
if (
106-
isNaN(targetBarWidth) ||
106+
Number.isNaN(targetBarWidth) ||
107107
typeof targetBarWidth === "undefined"
108108
)
109109
return;
@@ -175,9 +175,8 @@ function MicrophoneView({ mic }) {
175175

176176
const currentRenderer = rendererRef.current;
177177
if (
178-
currentRenderer &&
179-
currentRenderer.domElement &&
180-
currentMount.contains(currentRenderer.domElement)
178+
currentRenderer?.domElement &&
179+
currentMount?.contains(currentRenderer.domElement)
181180
) {
182181
currentMount.removeChild(currentRenderer.domElement);
183182
}

0 commit comments

Comments
 (0)