diff --git a/packages/gallery/src/components/gallery/proGallery/galleryScrollIndicator.js b/packages/gallery/src/components/gallery/proGallery/galleryScrollIndicator.js index dc02c8a71..ddcbc72f7 100644 --- a/packages/gallery/src/components/gallery/proGallery/galleryScrollIndicator.js +++ b/packages/gallery/src/components/gallery/proGallery/galleryScrollIndicator.js @@ -87,12 +87,12 @@ export default class ScrollIndicator extends React.Component { ) { try { scrollingElement - .horizontal() - .addEventListener('scroll', this.onHorizontalScroll); + ?.horizontal() + ?.addEventListener('scroll', this.onHorizontalScroll); scrollingElement - .horizontal() - .addEventListener( + ?.horizontal() + ?.addEventListener( 'scrollTransition', this.onHorizontalScrollTransition );