Skip to content

Commit

Permalink
cleaner condition
Browse files Browse the repository at this point in the history
  • Loading branch information
noam-heller1 committed Feb 15, 2024
1 parent 6514f89 commit cb83935
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit cb83935

Please sign in to comment.