Browse Source

Default empty width/height as 0 when cleared. Closes https://github.com/owncast/owncast/issues/781

pull/1886/head
Gabe Kangas 4 years ago
parent
commit
55f5406e5f
  1. 4
      web/components/config/video-variant-form.tsx

4
web/components/config/video-variant-form.tsx

@ -46,7 +46,7 @@ export default function VideoVariantForm({ @@ -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({ @@ -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

Loading…
Cancel
Save