Skip to content

Commit

Permalink
Fix infinite loop when adding assemblies as array
Browse files Browse the repository at this point in the history
  • Loading branch information
YuriyDurov committed Sep 15, 2024
1 parent 2ca814c commit 0408ad8
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ public static IBlazorStateBuilder AddAssemblyContaining<T>(this IBlazorStateBuil
/// </summary>
public static IBlazorStateBuilder AddAssemblies(this IBlazorStateBuilder blazorStateBuilder, params Assembly[] assemblies)
{
return blazorStateBuilder.AddAssemblies(assemblies);
foreach (var assembly in assemblies) blazorStateBuilder.AddAssembly(assembly);
return blazorStateBuilder;
}

/// <summary>
Expand All @@ -39,10 +40,7 @@ public static IBlazorStateBuilder AddAssemblies(this IBlazorStateBuilder blazorS
/// <returns></returns>
public static IBlazorStateBuilder AddAssemblies(this IBlazorStateBuilder blazorStateBuilder, IEnumerable<Assembly> assemblies)
{
foreach (var assembly in assemblies)
{
blazorStateBuilder.AddAssembly(assembly);
}
foreach (var assembly in assemblies) blazorStateBuilder.AddAssembly(assembly);
return blazorStateBuilder;
}

Expand Down

0 comments on commit 0408ad8

Please sign in to comment.