Skip to content

Commit 772ee66

Browse files
committed
When post data is loaded, set the local variable
1 parent f73a403 commit 772ee66

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/ProgrammerAl.Site/ProgrammerAl.Site/Pages/Post.razor.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,12 @@ protected override async Task OnInitializedAsync()
2323
{
2424
if (!string.IsNullOrWhiteSpace(PostUrl))
2525
{
26-
var post = await PostDataProvider.GetPostAsync(PostUrl);
26+
PostData = await PostDataProvider.GetPostAsync(PostUrl);
2727

28-
if (post is object)
28+
if (PostData is object)
2929
{
30-
PostHtml = new MarkupString(post.PostHtml);
30+
PostHtml = new MarkupString(PostData.PostHtml);
31+
await InvokeAsync(StateHasChanged);
3132
}
3233
}
3334

0 commit comments

Comments
 (0)