mirror of https://github.com/Radarr/Radarr
Add null check
This commit is contained in:
parent
37ab270c89
commit
e974a09144
|
@ -161,12 +161,12 @@ class MovieSearchInput extends Component {
|
|||
return;
|
||||
}
|
||||
|
||||
// If a suggestion is highlighted, go to that movie
|
||||
// otherwise search for a new movie
|
||||
if (highlightedSuggestionIndex) {
|
||||
this.goToMovie(suggestions[highlightedSuggestionIndex]);
|
||||
} else {
|
||||
// If no suggestion is highlighted, search for a new movie
|
||||
// otherwise go to the suggested movie
|
||||
if (highlightedSuggestionIndex == null) {
|
||||
this.props.onGoToAddNewMovie(value);
|
||||
} else {
|
||||
this.goToMovie(suggestions[highlightedSuggestionIndex]);
|
||||
}
|
||||
|
||||
this._autosuggest.input.blur();
|
||||
|
|
Loading…
Reference in New Issue