Skip to content

Commit 63a3925

Browse files
author
Marek Rozmus
committed
Add additional null check
1 parent 916e701 commit 63a3925

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/SwipeableListItem.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,9 @@ class SwipeableListItem extends PureComponent {
313313
return;
314314
}
315315

316-
this.listElement.style.transform = `translateX(${this.left}px)`;
316+
if (this.listElement) {
317+
this.listElement.style.transform = `translateX(${this.left}px)`;
318+
}
317319

318320
const opacity = (Math.abs(this.left) / 100).toFixed(2);
319321

0 commit comments

Comments
 (0)