Skip to content

Commit

Permalink
fix: UpdateCfg default to merge existing (#264)
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanJosipovic authored Jan 11, 2024
1 parent 32acbe9 commit 56f4786
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/BlazorApplicationInsights/ApplicationInsights.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public async Task StopTrackEvent(string name, Dictionary<string, object?>? prope
=> await _jsRuntime.InvokeVoidAsync("appInsights.stopTrackEvent", name, properties, measurements);

/// <inheritdoc />
public async Task UpdateCfg(Config newConfig, bool? mergeExisting = null)
public async Task UpdateCfg(Config newConfig, bool mergeExisting = true)
=> await _jsRuntime.InvokeVoidAsync("appInsights.updateCfg", newConfig, mergeExisting);

/// <inheritdoc />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ protected override async Task OnAfterRenderAsync(bool firstRender)

if (Config.Config != null)
{
await ApplicationInsights.UpdateCfg(Config.Config);
await ApplicationInsights.UpdateCfg(Config.Config, false);

await ApplicationInsights.TrackPageView();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public interface IApplicationInsights : IAppInsights, IDependenciesPlugin, IProp
/// </summary>
/// <param name="newConfig">The new configuration is apply</param>
/// <param name="mergeExisting">Should the new configuration merge with the existing or just replace it. Default is to merge.</param>
Task UpdateCfg(Config newConfig, bool? mergeExisting = null);
Task UpdateCfg(Config newConfig, bool mergeExisting = true);

/// <summary>
/// Sets JSRuntime for the service
Expand Down

0 comments on commit 56f4786

Please sign in to comment.