Skip to content

Commit 51aee4c

Browse files
Get slideAlignment from the right place in componentDidUpdate
1 parent 7df46fe commit 51aee4c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,8 @@ export default class Carousel extends Component {
136136
}
137137

138138
componentDidUpdate(prevProps, prevState) {
139-
const { children, autoplay, slideWidth } = this.props;
140-
const { currentSlide, loadedImages, direction, loading, slideDimensions, slideAlignment } = this.state;
139+
const { children, autoplay, slideWidth, slideAlignment } = this.props;
140+
const { currentSlide, loadedImages, direction, loading, slideDimensions } = this.state;
141141
const oldChildren = prevProps.children;
142142

143143
if (direction !== prevState.direction ||

0 commit comments

Comments
 (0)