From c43e7b43517e808b4ea2e610aa2e8a813ef0aa6e Mon Sep 17 00:00:00 2001 From: Emilo2 <99644577+Emilo2@users.noreply.github.com> Date: Thu, 2 May 2024 05:40:43 +0300 Subject: [PATCH] Select first result when selectedResult is not defined (#4770) --- ui/v2.5/src/components/Tagger/scenes/StashSearchResult.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/v2.5/src/components/Tagger/scenes/StashSearchResult.tsx b/ui/v2.5/src/components/Tagger/scenes/StashSearchResult.tsx index bca0087f2..7a8f97837 100755 --- a/ui/v2.5/src/components/Tagger/scenes/StashSearchResult.tsx +++ b/ui/v2.5/src/components/Tagger/scenes/StashSearchResult.tsx @@ -827,7 +827,7 @@ export const SceneSearchResults: React.FC = ({ 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) {