fix: custom search dropdown error

This commit is contained in:
David Ralph
2023-01-21 11:52:19 +00:00
committed by GitHub
parent 0d7668346f
commit 810ea969d9
2 changed files with 10 additions and 4 deletions

View File

@@ -12,8 +12,6 @@ Mue is a fast, open and free-to-use browser extension that gives a new, fresh an
<br>
## Table of contents
- [NOTICE](#notice)
- [Table of contents](#table-of-contents)
- [Screenshots](#screenshots)
- [Features](#features)

View File

@@ -89,7 +89,10 @@ export default class Search extends PureComponent {
}
if (setting === 'custom') {
url = localStorage.getItem('customSearchEngine');
const custom = localStorage.getItem('customSearchEngine');
if (custom !== null) {
url = custom;
}
}
if (localStorage.getItem('voiceSearch') === 'true') {
@@ -121,7 +124,12 @@ export default class Search extends PureComponent {
}
if (custom) {
url = localStorage.getItem('customSearchEngine');
const customSetting = localStorage.getItem('customSearchEngine');
if (customSetting !== null) {
url = customSetting;
} else {
url = this.state.url;
}
}
this.setState({