fix: voice search no longer redirects on empty and now has reload warning

This commit is contained in:
David Ralph
2021-06-21 13:13:16 +01:00
parent aad568bd28
commit 5b00b3d859
3 changed files with 6 additions and 1 deletions

View File

@@ -39,6 +39,10 @@ export default class Search extends React.PureComponent {
};
voiceSearch.onend = () => {
if (searchText.value === '') {
return;
}
setTimeout(() => {
window.location.href = this.state.url + `?${this.state.query}=` + searchText.value;
}, 1000);