Skip to content

Commit 8e4ee57

Browse files
committed
refactor: 增加逻辑检查
1 parent 938768f commit 8e4ee57

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/BootstrapBlazor/Components/IntersectionObserver/LoadMore.razor.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,9 @@ protected override void OnParametersSet()
5656

5757
private async Task OnIntersecting(IntersectionObserverEntry entry)
5858
{
59-
if (entry.IsIntersecting)
59+
if (entry.IsIntersecting && CanLoading && OnLoadMore != null)
6060
{
61-
if (OnLoadMore != null)
62-
{
63-
await OnLoadMore();
64-
}
61+
await OnLoadMore();
6562
}
6663
}
6764
}

0 commit comments

Comments
 (0)