Skip to content

Commit

Permalink
fix: pass null instead of boolean to drag event listener if disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
chawomack committed Apr 9, 2020
1 parent bf8f7e7 commit 2a884bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/CarouselItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ class CarouselItem extends PureComponent {
minWidth: `${this.props.width}px`,
pointerEvents: this.props.isDragging ? 'none' : null,
}}
onMouseDown={this.props.isDraggingEnabled && this.onMouseDown}
onTouchStart={this.props.isDraggingEnabled && this.onTouchStart}
onMouseDown={this.props.isDraggingEnabled ? this.onMouseDown : null}
onTouchStart={this.props.isDraggingEnabled ? this.onTouchStart : null}
>
{this.props.children}
</li>
Expand Down

0 comments on commit 2a884bf

Please sign in to comment.