mirror of
https://github.com/stashapp/stash.git
synced 2025-12-29 11:45:56 +01:00
Select first result when selectedResult is not defined (#4770)
This commit is contained in:
parent
4c0d9d0a07
commit
c43e7b4351
1 changed files with 1 additions and 1 deletions
|
|
@ -827,7 +827,7 @@ export const SceneSearchResults: React.FC<ISceneSearchResults> = ({
|
|||
|
||||
useEffect(() => {
|
||||
// #3198 - if the selected result is no longer in the list, reset it
|
||||
if (selectedResult && scenes?.length <= selectedResult) {
|
||||
if (!selectedResult || scenes?.length <= selectedResult) {
|
||||
if (!scenes) {
|
||||
setSelectedResult(undefined);
|
||||
} else if (scenes.length > 0 && scenes[0].resolved) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue