File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -170,7 +170,7 @@ class SwipeableListItem extends PureComponent {
170
170
if ( this . isSwiping ( ) ) {
171
171
const threshold = this . props . threshold || 0.5 ;
172
172
173
- if ( this . listElement !== null ) {
173
+ if ( this . listElement ) {
174
174
if ( this . left < this . listElement . offsetWidth * threshold * - 1 ) {
175
175
this . handleSwipedLeft ( ) ;
176
176
} else if ( this . left > this . listElement . offsetWidth * threshold ) {
@@ -185,7 +185,7 @@ class SwipeableListItem extends PureComponent {
185
185
186
186
this . resetState ( ) ;
187
187
188
- if ( this . listElement != null ) {
188
+ if ( this . listElement ) {
189
189
this . listElement . className = styles . contentReturn ;
190
190
this . listElement . style . transform = `translateX(${ this . left } px)` ;
191
191
}
@@ -317,7 +317,7 @@ class SwipeableListItem extends PureComponent {
317
317
318
318
const opacity = ( Math . abs ( this . left ) / 100 ) . toFixed ( 2 ) ;
319
319
320
- if ( this . props . onSwipeProgress && this . listElement !== null ) {
320
+ if ( this . props . onSwipeProgress && this . listElement ) {
321
321
const listElementWidth = this . listElement . offsetWidth ;
322
322
let swipeDistancePercent = this . previousSwipeDistancePercent ;
323
323
You can’t perform that action at this time.
0 commit comments