We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent abf8e7a commit a6ac789Copy full SHA for a6ac789
src/components/SearchModal.tsx
@@ -935,7 +935,14 @@ function SearchResults({ focusedIndex }: { focusedIndex: number }) {
935
const observer = new IntersectionObserver(
936
(entries) => {
937
entries.forEach((entry) => {
938
- if (entry.isIntersecting && !isLastPage) {
+ // Add null-safety checks to prevent accessing properties on null refs
939
+ // during component unmounting/navigation transitions
940
+ if (
941
+ entry.isIntersecting &&
942
+ !isLastPage &&
943
+ sentinelRef.current &&
944
+ containerRef.current
945
+ ) {
946
showMore()
947
}
948
})
0 commit comments