Skip to content

Commit

Permalink
[FIX] - fix scrollIndication hydration exception (#1180)
Browse files Browse the repository at this point in the history
  • Loading branch information
liatv authored Jan 28, 2024
1 parent a375a82 commit 3cdf536
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,8 @@ export default class ScrollIndicator extends React.Component {
this.props.galleryScrollDirection === GALLERY_CONSTS[optionsMap.layoutParams.structure.scrollDirection].HORIZONTAL
) {
try {
scrollingElement.horizontal().addEventListener('scroll', this.onHorizontalScroll);

scrollingElement.horizontal().addEventListener('scrollTransition', this.onHorizontalScrollTransition);
scrollingElement?.horizontal()?.addEventListener('scroll', this.onHorizontalScroll);
scrollingElement?.horizontal()?.addEventListener('scrollTransition', this.onHorizontalScrollTransition);
} catch (e) {
console.error(e);
}
Expand Down

0 comments on commit 3cdf536

Please sign in to comment.