diff --git a/src/js/views/Search.js b/src/js/views/Search.js index 9f3e1a31..26492a37 100755 --- a/src/js/views/Search.js +++ b/src/js/views/Search.js @@ -32,12 +32,14 @@ class Search extends React.Component{ // Auto-focus on the input field $(document).find('.search-form input').focus(); - if (this.props.mopidy_connected && this.props.search_settings.uri_schemes){ - this.props.mopidyActions.getSearchResults(this.props.view, this.props.params.query) - } + if (this.props.params.query && this.props.params.query !== ''){ + if (this.props.mopidy_connected && this.props.search_settings.uri_schemes){ + this.props.mopidyActions.getSearchResults(this.props.view, this.props.params.query) + } - if (this.props.mopidy_connected && this.props.search_settings.uri_schemes && this.props.search_settings.uri_schemes.includes('spotify:')){ - this.props.spotifyActions.getSearchResults(this.props.view, this.props.params.query) + if (this.props.mopidy_connected && this.props.search_settings.uri_schemes && this.props.search_settings.uri_schemes.includes('spotify:')){ + this.props.spotifyActions.getSearchResults(this.props.view, this.props.params.query) + } } }