From 575db8294d36a50f1896ccf49cccaef5489df4fc Mon Sep 17 00:00:00 2001 From: Johannes Klein Date: Wed, 16 Apr 2025 20:43:31 +0200 Subject: [PATCH] Not access taxon in SuggestionsResult if none --- .../Match/AdditionalSuggestions/SuggestionsResult.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/Match/AdditionalSuggestions/SuggestionsResult.js b/src/components/Match/AdditionalSuggestions/SuggestionsResult.js index 4c0f7d9a4..3e40a3260 100644 --- a/src/components/Match/AdditionalSuggestions/SuggestionsResult.js +++ b/src/components/Match/AdditionalSuggestions/SuggestionsResult.js @@ -44,6 +44,10 @@ const SuggestionsResult = ( { } }, [forcedHeight] ); + if ( !taxon ) { + return null; + } + const accessibleName = accessibleTaxonName( taxon, currentUser, t ); // A representative photo is dependant on the actual image that was scored by computer vision