Skip to content

Commit e33781c

Browse files
authored
Rename DisableMatchAllIgnoresLeftUriPart to EnableMatchAllForQueryStringAndFragmentSwitchKey (#60969)
1 parent 58f2c59 commit e33781c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Components/Web/src/Routing/NavLink.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ namespace Microsoft.AspNetCore.Components.Routing;
1212
/// </summary>
1313
public class NavLink : ComponentBase, IDisposable
1414
{
15-
private const string DisableMatchAllIgnoresLeftUriPartSwitchKey = "Microsoft.AspNetCore.Components.Routing.NavLink.DisableMatchAllIgnoresLeftUriPart";
16-
private static readonly bool _disableMatchAllIgnoresLeftUriPart = AppContext.TryGetSwitch(DisableMatchAllIgnoresLeftUriPartSwitchKey, out var switchValue) && switchValue;
15+
private const string EnableMatchAllForQueryStringAndFragmentSwitchKey = "Microsoft.AspNetCore.Components.Routing.NavLink.EnableMatchAllForQueryStringAndFragment";
16+
private static readonly bool _enableMatchAllForQueryStringAndFragment = AppContext.TryGetSwitch(EnableMatchAllForQueryStringAndFragmentSwitchKey, out var switchValue) && switchValue;
1717

1818
private const string DefaultActiveClass = "active";
1919

@@ -133,7 +133,7 @@ protected virtual bool ShouldMatch(string currentUriAbsolute)
133133
return true;
134134
}
135135

136-
if (_disableMatchAllIgnoresLeftUriPart || Match != NavLinkMatch.All)
136+
if (_enableMatchAllForQueryStringAndFragment || Match != NavLinkMatch.All)
137137
{
138138
return false;
139139
}

0 commit comments

Comments
 (0)