Skip to content

Record your screen, ship a demo. Free and open-source, GPU-accelerated, no watermarks, no subscriptions. Windows, macOS, Linux. Actively maintained.

fix: feedback coderabbit

Garry Laly2ee7ccd89cad
diff --git a/src/lib/compositeLayout.ts b/src/lib/compositeLayout.ts
index b51b9ffae..48583a370 100644
--- a/src/lib/compositeLayout.ts
+++ b/src/lib/compositeLayout.ts
@@ -60,7 +60,8 @@ export interface WebcamCompositeLayout {
/** Convert a webcam size percentage (10–50) to a fraction of the reference dimension. */
function webcamSizeToFraction(percent: number): number {
- const clamped = Math.max(10, Math.min(50, percent));
+ const safe = Number.isFinite(percent) ? percent : 25;
+ const clamped = Math.max(10, Math.min(50, safe));
return clamped / 100;
}