We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bb39bf0 commit 6339929Copy full SHA for 6339929
src/components/carousel/index.js
@@ -234,13 +234,15 @@ export default class Carousel extends BaseComponent {
234
};
235
236
renderChild = (child, key) => {
237
- const paddingLeft = this.shouldUsePageWidth() ? this.props.itemSpacings : undefined;
238
-
239
- return (
240
- <View style={{width: this.state.pageWidth, paddingLeft}} key={key} collapsable={false}>
241
- {child}
242
- </View>
243
- );
+ if (child) {
+ const paddingLeft = this.shouldUsePageWidth() ? this.props.itemSpacings : undefined;
+
+ return (
+ <View style={{width: this.state.pageWidth, paddingLeft}} key={key} collapsable={false}>
+ {child}
+ </View>
244
+ );
245
+ }
246
247
248
renderChildren() {
0 commit comments