From cb83935da120df0289856aceada7beaa40d4c607 Mon Sep 17 00:00:00 2001 From: noam-heller1 Date: Thu, 15 Feb 2024 16:20:41 +0200 Subject: [PATCH] cleaner condition --- .../src/components/gallery/proGallery/galleryScrollIndicator.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/gallery/src/components/gallery/proGallery/galleryScrollIndicator.js b/packages/gallery/src/components/gallery/proGallery/galleryScrollIndicator.js index 0e8d0f087..dfe280b74 100644 --- a/packages/gallery/src/components/gallery/proGallery/galleryScrollIndicator.js +++ b/packages/gallery/src/components/gallery/proGallery/galleryScrollIndicator.js @@ -59,7 +59,7 @@ export default class ScrollIndicator extends React.Component { this.onHorizontalScroll = (e) => { this.props.setGotFirstScrollIfNeeded(); const target = e.currentTarget || e.target || e; - let left = target && (target.scrollX || target.scrollLeft !== undefined ? target.scrollLeft : target.x); + let left = target && (target.scrollX ?? target.scrollLeft ?? target.x); if (this.props.isRTL) { left = Math.abs(left); //this.props.totalWidth - left; }