Clamp generator parameters (#2319)

This commit is contained in:
WithoutPants
2022-02-17 09:33:37 +11:00
committed by GitHub
parent 9321388770
commit 429fc3869b
2 changed files with 12 additions and 2 deletions

View File

@@ -47,11 +47,12 @@ export const VideoPreviewInput: React.FC<IVideoPreviewInput> = ({
<Form.Control
className="text-input"
type="number"
value={previewSegments?.toString() ?? 0}
value={previewSegments?.toString() ?? 1}
min={1}
onChange={(e: React.ChangeEvent<HTMLInputElement>) =>
set({
previewSegments: Number.parseInt(
e.currentTarget.value || "0",
e.currentTarget.value || "1",
10
),
})