diff --git a/CHANGELOG.md b/CHANGELOG.md index c945ff71b..959039484 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## v2.3.1 +* Fix issue when snap is disabled + ## v2.3.0 * Refactor callback handling to provide a more reliable solution when momentum is disabled * Fix issue with parallel animations (thanks [@jnbt](https://github.com/jnbt)) diff --git a/index.js b/index.js index 95141807e..7050d77b9 100644 --- a/index.js +++ b/index.js @@ -462,14 +462,14 @@ export default class Carousel extends Component { } _onScrollEndDragDebounced (event) { - if (this._scrollview) { + if (this._scrollview && this._onScrollEnd) { this._onScrollEnd(); } } // Used when `enableMomentum` is ENABLED _onMomentumScrollEnd (event) { - if (this._scrollview) { + if (this._scrollview && this._onScrollEnd) { this._onScrollEnd(); } } diff --git a/package.json b/package.json index 9b699959a..6e05d8f9a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-snap-carousel", - "version": "2.3.0", + "version": "2.3.1", "description": "Swiper component for React Native with previews and snapping effect. Compatible with Android & iOS.", "main": "index.js", "repository": {