Default empty width/height as 0 when cleared. Closes https://github.com/owncast/owncast/issues/781
This commit is contained in:
@@ -46,7 +46,7 @@ export default function VideoVariantForm({
|
|||||||
if (isNaN(value)) {
|
if (isNaN(value)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
onUpdateField({ fieldName: 'scaledWidth', value: value || '' });
|
onUpdateField({ fieldName: 'scaledWidth', value: value || 0 });
|
||||||
};
|
};
|
||||||
const handleScaledHeightChanged = (args: UpdateArgs) => {
|
const handleScaledHeightChanged = (args: UpdateArgs) => {
|
||||||
const value = Number(args.value);
|
const value = Number(args.value);
|
||||||
@@ -54,7 +54,7 @@ export default function VideoVariantForm({
|
|||||||
if (isNaN(value)) {
|
if (isNaN(value)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
onUpdateField({ fieldName: 'scaledHeight', value: value || '' });
|
onUpdateField({ fieldName: 'scaledHeight', value: value || 0 });
|
||||||
};
|
};
|
||||||
|
|
||||||
// Video passthrough handling
|
// Video passthrough handling
|
||||||
|
|||||||
Reference in New Issue
Block a user