Fixed half of warnings having to do with allowing Null string objects. (#791)
This commit is contained in:
1 parent
60fe2dae60
commit
36dbc2f256
27 files changed
+65
-65
No files matched your search
@@ -27,7 +27,7 @@ public static class ManageNavPages
|
||||
public static string PageNavClass(ViewContext viewContext, string page)
|
||||
{
|
||||
var activePage = viewContext.ViewData["ActivePage"] as string;
|
||||
return string.Equals(activePage, page, StringComparison.OrdinalIgnoreCase) ? "active" : null;
|
||||
return string.Equals(activePage, page, StringComparison.OrdinalIgnoreCase) ? "active" : string.Empty;
|
||||
}
|
||||
|
||||
public static void AddActivePage(this ViewDataDictionary viewData, string activePage) => viewData[ActivePageKey] = activePage;
|
||||
|
||||
Reference in new issue
Block a user