From e4d6720b6848de552aba04c66c33fddc31bc74c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Victor?= Date: Mon, 21 Oct 2024 15:15:01 -0300 Subject: [PATCH] fix: Adjust useSticyScroll hook dependency arrays --- bigbluebutton-html5/imports/ui/hooks/useStickyScroll.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bigbluebutton-html5/imports/ui/hooks/useStickyScroll.ts b/bigbluebutton-html5/imports/ui/hooks/useStickyScroll.ts index d555783f6c..25fa6437f8 100644 --- a/bigbluebutton-html5/imports/ui/hooks/useStickyScroll.ts +++ b/bigbluebutton-html5/imports/ui/hooks/useStickyScroll.ts @@ -51,20 +51,20 @@ const useStickyScroll = ( } }); }); - }, [stickyElement]); + }, [stickyElement, operator]); handlers.current.startObserving = useCallback(() => { if (!onResizeOf) return; clearTimeout(timeout.current); observer.current?.observe(onResizeOf); - }, [onResizeOf, observer.current]); + }, [onResizeOf]); handlers.current.stopObserving = useCallback(() => { if (!onResizeOf) return; timeout.current = setTimeout(() => { observer.current?.unobserve(onResizeOf); }, 500); - }, [onResizeOf, observer.current]); + }, [onResizeOf]); useEffect( () => () => {