esoftplay 0.0.227 → 0.0.228

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.
@@ -181,13 +181,15 @@ export default class m extends LibComponent<LibCarrouselProps, LibCarrouselState
181
181
  }
182
182
 
183
183
  _onScrollEnd(event: any): void {
184
- const offset = { ...event.nativeEvent.contentOffset };
185
- const page = this._calculateCurrentPage(offset.x);
186
- const originalPage = Math.round(offset / this.state.size.width);
187
- if (originalPage != page)
188
- this._placeCritical(page);
189
- this._setCurrentPage(page);
190
- this._setUpTimer();
184
+ if (this.state.childrenLength > 1) {
185
+ const offset = { ...event.nativeEvent.contentOffset };
186
+ const page = this._calculateCurrentPage(offset.x);
187
+ const originalPage = Math.round(offset / this.state.size.width);
188
+ if (originalPage != page)
189
+ this._placeCritical(page);
190
+ this._setCurrentPage(page);
191
+ this._setUpTimer();
192
+ }
191
193
  }
192
194
 
193
195
  _onScroll(event: any): void {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "esoftplay",
3
- "version": "0.0.227",
3
+ "version": "0.0.228",
4
4
  "description": "embedding data from esoftplay framework (web based) into mobile app",
5
5
  "main": "cache/index.js",
6
6
  "types": "../../index.d.ts",