Skip to content

Commit 233cd35

Browse files
committed
refactor: 使用空集合代替 new 提高性能
1 parent bd0f597 commit 233cd35

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/BootstrapBlazor/Services/DefaultIconTheme.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public FrozenDictionary<ComponentIcons, string> GetIcons()
2222
{
2323
if (!_options.Value.Icons.TryGetValue(_options.Value.ThemeKey, out var icons))
2424
{
25-
icons = new Dictionary<ComponentIcons, string>().ToFrozenDictionary();
25+
icons = FrozenDictionary<ComponentIcons, string>.Empty;
2626
}
2727
return icons;
2828
}

0 commit comments

Comments
 (0)