Skip to content

Commit

Permalink
fix(algolia-search): test for canUseIntersectionObserver (#7761)
Browse files Browse the repository at this point in the history
[FIX] Update observer condition

Replace condition canUseDOM to canUseIntersectionObserver as check is done for IntersectionObserver usage
  • Loading branch information
RoiArthurB authored and slorber committed Jul 14, 2022
1 parent b698e8f commit 0a58d85
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -280,7 +280,7 @@ function SearchPageContent(): JSX.Element {
const [loaderRef, setLoaderRef] = useState<HTMLDivElement | null>(null);
const prevY = useRef(0);
const observer = useRef(
ExecutionEnvironment.canUseDOM &&
ExecutionEnvironment.canUseIntersectionObserver &&
new IntersectionObserver(
(entries) => {
const {
Expand Down

0 comments on commit 0a58d85

Please sign in to comment.