mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-31 09:57:03 +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 prevY = useRef(0);
|
||||
const observer = useRef(
|
||||
ExecutionEnvironment.canUseDOM &&
|
||||
ExecutionEnvironment.canUseIntersectionObserver &&
|
||||
new IntersectionObserver(
|
||||
(entries) => {
|
||||
const {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue