diff --git a/src/components/StickySidebar/StickySidebar.tsx b/src/components/StickySidebar/StickySidebar.tsx index 7c5f41c3..7668083e 100644 --- a/src/components/StickySidebar/StickySidebar.tsx +++ b/src/components/StickySidebar/StickySidebar.tsx @@ -31,11 +31,11 @@ export class StickySidebar extends ComponentWithOptions { stickyElement: Element; componentDidMount() { - stickyfill.add(this.refs['sticky-children']); + stickyfill.add(this.stickyElement); } componentWillUnmount() { - stickyfill.remove(this.refs['sticky-children']); + stickyfill.remove(this.stickyElement); } get scrollYOffset() {