Fix default search engine in settings menu

This commit is contained in:
Aj - Thomas
2022-05-12 22:35:21 +02:00
parent 7040760a84
commit 3cbc7683e8

View File

@@ -42,9 +42,9 @@ function SettingsMenu(props: any) {
<Group>
<SegmentedControl
title="Search engine"
defaultValue={
value={
// Match config.settings.searchUrl with a key in the matches array
matches.find((match) => match.value === config.settings.searchUrl)?.value || 'Google'
matches.find((match) => match.value === config.settings.searchUrl)?.value ?? 'Google'
}
onChange={
// Set config.settings.searchUrl to the value of the selected item