We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 17fa999 commit 80fd39eCopy full SHA for 80fd39e
src/components/settings-page.tsx
@@ -342,11 +342,11 @@ function ComboComponent(props: {
342
}) {
343
const [open, setOpen] = useState(false);
344
345
- const selectedOption = props.setting.options.find(
346
- (option) => option.id === props.value,
347
- );
348
- if (!selectedOption) {
349
- throw new Error("Selected option not found");
+ const selectedOption =
+ props.setting.options.find((option) => option.id === props.value) ??
+ props.setting.options[0];
+ if (selectedOption.id !== props.value) {
+ props.changeCallback(selectedOption.id);
350
}
351
352
return (
0 commit comments