Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix: Add null-safety checks to SearchModal IntersectionObserver
  • Loading branch information
sentry[bot] authored Feb 20, 2026
commit a6ac7896a2fdc2571adfcd70139289560bec6f44
9 changes: 8 additions & 1 deletion src/components/SearchModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -935,7 +935,14 @@ function SearchResults({ focusedIndex }: { focusedIndex: number }) {
const observer = new IntersectionObserver(
(entries) => {
entries.forEach((entry) => {
if (entry.isIntersecting && !isLastPage) {
// Add null-safety checks to prevent accessing properties on null refs
// during component unmounting/navigation transitions
if (
entry.isIntersecting &&
!isLastPage &&
sentinelRef.current &&
containerRef.current
) {
showMore()
}
})
Expand Down
Loading