Skip to content

Commit 3ca4ba0

Browse files
committed
Update SeedControl to use undefined instead of null in onChange callback
1 parent 62d5360 commit 3ca4ba0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

webview-ui/src/components/settings/SeedControl.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { useDebounce } from "react-use"
55

66
interface SeedControlProps {
77
value: number | undefined | null
8-
onChange: (value: number | undefined | null) => void
8+
onChange: (value: number | undefined) => void
99
}
1010

1111
export const SeedControl = ({ value, onChange }: SeedControlProps) => {
@@ -16,7 +16,7 @@ export const SeedControl = ({ value, onChange }: SeedControlProps) => {
1616
useDebounce(
1717
() => {
1818
if (inputValue === "") {
19-
onChange(null)
19+
onChange(undefined)
2020
} else {
2121
const numValue = parseInt(inputValue, 10)
2222
if (!isNaN(numValue)) {

0 commit comments

Comments
 (0)