From 55f5406e5f1b8f645d16517983f12a11fd6c0d34 Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Tue, 2 Mar 2021 19:10:23 -0800 Subject: [PATCH] Default empty width/height as 0 when cleared. Closes https://github.com/owncast/owncast/issues/781 --- web/components/config/video-variant-form.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/components/config/video-variant-form.tsx b/web/components/config/video-variant-form.tsx index 4ead753be..dc0655b43 100644 --- a/web/components/config/video-variant-form.tsx +++ b/web/components/config/video-variant-form.tsx @@ -46,7 +46,7 @@ export default function VideoVariantForm({ if (isNaN(value)) { return; } - onUpdateField({ fieldName: 'scaledWidth', value: value || '' }); + onUpdateField({ fieldName: 'scaledWidth', value: value || 0 }); }; const handleScaledHeightChanged = (args: UpdateArgs) => { const value = Number(args.value); @@ -54,7 +54,7 @@ export default function VideoVariantForm({ if (isNaN(value)) { return; } - onUpdateField({ fieldName: 'scaledHeight', value: value || '' }); + onUpdateField({ fieldName: 'scaledHeight', value: value || 0 }); }; // Video passthrough handling