Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-2258: Preserve user onboarding settings #681

Merged
merged 10 commits into from Mar 15, 2021

Simplify and fix default browser check

  • Loading branch information
leuryr committed Feb 19, 2021
commit 45caa111532dd437b89b6902f099491ef02c7d96
@@ -89,12 +89,9 @@ class ChooseDefaultSearchView extends Component {
SEARCH_YAHOO,
SEARCH_STARTPAGE,
];
const isOther = searchChoices.reduce((accum, choice) => {
if (accum === false) return false;
return choice !== defaultSearch;
}, false);
const isOther = !searchChoices.includes(defaultSearch);
const prevChosenSearch = isOther ? SEARCH_OTHER : defaultSearch;
this.setState({ chosenSearch: prevChosenSearch, otherSearchSelected: isOther ? prevChosenSearch : null });
this.setState({ chosenSearch: prevChosenSearch, otherSearchSelected: isOther ? defaultSearch : null });
}
}

ProTip! Use n and p to navigate between commits in a pull request.