Skip to content

Commit 4d06187

Browse files
committed
use ?. and ?? instead of if == null
1 parent 468f889 commit 4d06187

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

Flow.Launcher.Infrastructure/StringMatcher.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,7 @@ public MatchResult FuzzyMatch(string query, string stringToCompare, MatchOption
4848

4949
query = query.Trim();
5050

51-
if (_alphabet != null)
52-
{
53-
query = _alphabet.Translate(query);
54-
stringToCompare = _alphabet.Translate(stringToCompare);
55-
}
51+
stringToCompare = _alphabet?.Translate(stringToCompare) ?? stringToCompare;
5652

5753
// This also can be done by spliting the query
5854

0 commit comments

Comments
 (0)