Skip to content

Commit 16dcae4

Browse files
committed
Fix
1 parent 07d08eb commit 16dcae4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/components/MoveIteration.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,10 @@ function MoveIteration({
5151
options={iterationsPicker}
5252
value={newIteration}
5353
onChange={(_event, newValue: Picker) => {
54-
setNewIteration(
55-
iterationsPicker.find((it: Picker) => it.id === newValue.id)
54+
const foundValue = iterationsPicker.find(
55+
(it: Picker) => it.id === newValue.id
5656
);
57+
if (foundValue) setNewIteration(foundValue);
5758
}}
5859
renderInput={(params): JSX.Element => (
5960
<TextField {...params} label="New Iteration" />

0 commit comments

Comments
 (0)