fix(scroll): guard against zero window size in bound detection#2146
fix(scroll): guard against zero window size in bound detection#2146naqvitalha merged 1 commit intomainfrom
Conversation
|
@agent review this PR |
|
Claude finished @naqvitalha's task in 1m 49s —— View job Review of PR #2146
SummaryThis PR adds an early return in Verdict: Looks good ✅The fix is minimal, well-placed, and correctly addresses the root cause. A few observations: What's correct:
Minor observations (non-blocking):
Overall: Clean, surgical fix that matches the issue's root cause. The zero-size guard is a sensible invariant to enforce regardless of the specific bug report — there's no valid scenario where bound detection should run against a zero-size window. |
Summary
visibleLength <= 0early return inuseBoundDetectionto skiponEndReached/onStartReachedwhen the list has no measurable sizeFixes #1956
Test plan
onEndReachedno longer fires when list is mounted in a background/hidden tabonEndReachedstill fires correctly during normal scrollingyarn test)