Skip to content

Commit

Permalink
Fix state generated after InitializeStateAsync not being persisted
Browse files Browse the repository at this point in the history
  • Loading branch information
YuriyDurov committed Sep 15, 2024
1 parent 62ab1df commit 55a3032
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ protected override async Task RunInitAndSetParametersAsync()
await SetupStateAsync();

await base.RunInitAndSetParametersAsync();

if (PersistentComponent.StateContainer is not null)
await PersistentComponent.StateContainer!.RefreshAsync();
}

private async Task WaitForPageStateAsync()
Expand Down Expand Up @@ -161,9 +164,6 @@ protected async Task InitializeStateAsync()
await PersistentComponent.InitializeStateInternalAsync();

StateInitialized = true;

if (PersistentComponent.StateContainer is not null)
await PersistentComponent.StateContainer!.RefreshAsync();
}

internal override void BuildRenderTree(RenderTreeBuilder builder)
Expand Down

0 comments on commit 55a3032

Please sign in to comment.