Skip to content

Commit 47314e3

Browse files
committed
refactor: 重构代码
1 parent 9203da8 commit 47314e3

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/BootstrapBlazor/Components/Tab/Tab.razor.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Licensed to the .NET Foundation under one or more agreements.
1+
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the Apache 2.0 License
33
// See the LICENSE file in the project root for more information.
44
// Maintainer: Argo Zhang([email protected]) Website: https://www.blazor.zone
@@ -804,7 +804,11 @@ public void AddTab(string url, string text, string? icon = null, bool active = t
804804
StateHasChanged();
805805
}
806806

807-
private static List<Assembly> GetAdditionalAssemblies() => [Assembly.GetEntryAssembly()!];
807+
private static List<Assembly> GetAdditionalAssemblies()
808+
{
809+
var assembly = Assembly.GetEntryAssembly();
810+
return assembly is null ? [] : [assembly];
811+
}
808812

809813
private void AddTabItem(string url)
810814
{

0 commit comments

Comments
 (0)