Skip to content

Commit 3e64f20

Browse files
committed
Change Router _emptyParametersDictionary to a regular Dictionary
This allows for ReadOnlyDictionary to be trimmed in a default Blazor WASM app. Saving roughly 3 KB .br compressed. Contributes to dotnet#30098
1 parent b12b64e commit 3e64f20

File tree

1 file changed

+2
-2
lines changed
  • src/Components/Components/src/Routing

1 file changed

+2
-2
lines changed

src/Components/Components/src/Routing/Router.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ namespace Microsoft.AspNetCore.Components.Routing
2323
public class Router : IComponent, IHandleAfterRender, IDisposable
2424
{
2525
static readonly char[] _queryOrHashStartChar = new[] { '?', '#' };
26-
static readonly ReadOnlyDictionary<string, object> _emptyParametersDictionary
27-
= new ReadOnlyDictionary<string, object>(new Dictionary<string, object>());
26+
static readonly IReadOnlyDictionary<string, object> _emptyParametersDictionary
27+
= new Dictionary<string, object>();
2828

2929
RenderHandle _renderHandle;
3030
string _baseUri;

0 commit comments

Comments
 (0)