Skip to content

Commit 50cdc41

Browse files
committed
Simplified OnParameterSetAsync in Index
1 parent d2b0db5 commit 50cdc41

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

LinkDotNet.Blog.Web/Pages/Index.razor

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242

4343
protected override async Task OnParametersSetAsync()
4444
{
45-
if (Page == null || Page < 1)
45+
if (Page is null or < 1)
4646
{
4747
Page = 1;
4848
}
@@ -51,7 +51,7 @@
5151
p => p.IsPublished,
5252
b => b.UpdatedDate,
5353
pageSize: appConfiguration.BlogPostsPerPage,
54-
page: Page ?? 1);
54+
page: Page.Value);
5555
}
5656

5757
protected override async Task OnAfterRenderAsync(bool firstRender)

0 commit comments

Comments
 (0)