Skip to content

Commit e2a1a17

Browse files
charlesvienjonathanlab
authored andcommitted
guard handleModelChange on modelOption being defined
1 parent 421c644 commit e2a1a17

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

apps/code/src/renderer/features/task-detail/components/TaskInputEditor.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,9 @@ export const TaskInputEditor = forwardRef<
139139
};
140140

141141
const handleModelChange = (value: string) => {
142-
onConfigOptionChange?.(modelOption?.id ?? "model", value);
142+
if (modelOption) {
143+
onConfigOptionChange?.(modelOption.id, value);
144+
}
143145
};
144146

145147
const handleThoughtChange = (value: string) => {

0 commit comments

Comments
 (0)