Warning if not using 'is not null'

This commit is contained in:
nicolas.dorier
2022-01-14 17:48:15 +09:00
parent 5cbc2e96e7
commit c6a7e90c1a
9 changed files with 13 additions and 11 deletions

View File

@@ -40,7 +40,7 @@ namespace BTCPayServer
// but we want searchTerm to be null only if the user is browsing the page via some link
// NOT if the user entered some empty search
var searchTerm = model.SearchTerm;
searchTerm = searchTerm is string ? searchTerm :
searchTerm = searchTerm is not null ? searchTerm :
ctrl.Request.Query.ContainsKey(nameof(searchTerm)) ? string.Empty :
null;
if (searchTerm is null)