@momo-kits/swipe 0.0.18 → 0.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/Swiper.js +7 -10
  2. package/package.json +1 -1
package/Swiper.js CHANGED
@@ -577,16 +577,13 @@ export default class Swiper extends Component {
577
577
  }
578
578
 
579
579
  renderTitle = () => {
580
- const title = child && child.props && child.props.title;
581
- if(title) return null;
582
- const child = this?.props?.children[this?.state?.index];
583
- return title
584
- ? (
585
- <View style={styles.title}>
586
- {this?.props?.children[this.state.index].props.title}
587
- </View>
588
- )
589
- : null;
580
+ const child = this.state.children[this.state.index]
581
+ const title = child && child.props && child.props.title
582
+ return title ? (
583
+ <View style={styles.title}>
584
+ {this.state.children[this.state.index].props.title}
585
+ </View>
586
+ ) : null
590
587
  }
591
588
 
592
589
  renderNextButton = () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/swipe",
3
- "version": "0.0.18",
3
+ "version": "0.0.22",
4
4
  "private": false,
5
5
  "main": "index.js",
6
6
  "dependencies": {},