mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-03 11:22:30 +02:00
fix(algolia-search): test for canUseIntersectionObserver (#7761)
[FIX] Update observer condition Replace condition canUseDOM to canUseIntersectionObserver as check is done for IntersectionObserver usage
This commit is contained in:
parent
ee98512083
commit
1ad97843ac
1 changed files with 1 additions and 1 deletions
|
@ -280,7 +280,7 @@ function SearchPageContent(): JSX.Element {
|
||||||
const [loaderRef, setLoaderRef] = useState<HTMLDivElement | null>(null);
|
const [loaderRef, setLoaderRef] = useState<HTMLDivElement | null>(null);
|
||||||
const prevY = useRef(0);
|
const prevY = useRef(0);
|
||||||
const observer = useRef(
|
const observer = useRef(
|
||||||
ExecutionEnvironment.canUseDOM &&
|
ExecutionEnvironment.canUseIntersectionObserver &&
|
||||||
new IntersectionObserver(
|
new IntersectionObserver(
|
||||||
(entries) => {
|
(entries) => {
|
||||||
const {
|
const {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue