Skip to content

Commit f905530

Browse files
Check query nullability
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
1 parent 03164fb commit f905530

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

Flow.Launcher.Infrastructure/StringMatcher.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ public MatchResult FuzzyMatch(string query, string stringToCompare, MatchOption
7171
query = query.Trim();
7272
query = RemoveAccents(query);
7373
stringToCompare = RemoveAccents(stringToCompare);
74+
if (string.IsNullOrWhiteSpace(query) || string.IsNullOrEmpty(stringToCompare))
75+
return new MatchResult(false, UserSettingSearchPrecision);
7476
TranslationMapping translationMapping = null;
7577
if (_alphabet is not null && _alphabet.ShouldTranslate(query))
7678
{

0 commit comments

Comments
 (0)