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 committed Jul 11, 2022
1 parent ee98512 commit 1ad9784
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 1ad9784

Please sign in to comment.