Commit 3669b0a 1 parent d91bb58 commit 3669b0a Copy full SHA for 3669b0a
File tree 2 files changed +2
-5
lines changed
2 files changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -198,7 +198,7 @@ export default class Slider extends React.Component {
198
198
if ( settings === "unslick" ) {
199
199
const className = "regular slider " + ( this . props . className || "" ) ;
200
200
return < div className = { className } > { children } </ div > ;
201
- } else if ( newChildren . length <= settings . slidesToShow ) {
201
+ } else if ( newChildren . length <= settings . slidesToShow && ! settings . infinite ) {
202
202
settings . unslick = true ;
203
203
}
204
204
return (
Original file line number Diff line number Diff line change @@ -138,8 +138,7 @@ const renderSlides = spec => {
138
138
if ( spec . infinite && spec . fade === false ) {
139
139
let preCloneNo = childrenCount - index ;
140
140
if (
141
- preCloneNo <= getPreClones ( spec ) &&
142
- childrenCount !== spec . slidesToShow
141
+ preCloneNo <= getPreClones ( spec )
143
142
) {
144
143
key = - preCloneNo ;
145
144
if ( key >= startIndex ) {
@@ -164,7 +163,6 @@ const renderSlides = spec => {
164
163
) ;
165
164
}
166
165
167
- if ( childrenCount !== spec . slidesToShow ) {
168
166
key = childrenCount + index ;
169
167
if ( key < endIndex ) {
170
168
child = elem ;
@@ -186,7 +184,6 @@ const renderSlides = spec => {
186
184
}
187
185
} )
188
186
) ;
189
- }
190
187
}
191
188
} ) ;
192
189
You can’t perform that action at this time.
0 commit comments