diff --git a/README.md b/README.md index fdf2124b..cdd4846b 100644 --- a/README.md +++ b/README.md @@ -12,8 +12,6 @@ Mue is a fast, open and free-to-use browser extension that gives a new, fresh an
## Table of contents - -- [NOTICE](#notice) - [Table of contents](#table-of-contents) - [Screenshots](#screenshots) - [Features](#features) diff --git a/src/components/widgets/search/Search.jsx b/src/components/widgets/search/Search.jsx index d82b6b49..a1be54fb 100644 --- a/src/components/widgets/search/Search.jsx +++ b/src/components/widgets/search/Search.jsx @@ -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({