Comparing version 0.1.2 to 0.1.3
@@ -100,2 +100,6 @@ 'use strict'; | ||
if (this.props.children.length === 1) { | ||
return; | ||
} | ||
var props = { | ||
@@ -126,2 +130,5 @@ onClick: function onClick(number) { | ||
value: function renderControls() { | ||
if (this.props.children.length === 1) { | ||
return; | ||
} | ||
var _props = this.props; | ||
@@ -298,3 +305,3 @@ var nextIcon = _props.nextIcon; | ||
value: function startAnimationLoop() { | ||
if (!this.props.autoplay) { | ||
if (!this.props.autoplay || this.props.children.length === 1) { | ||
return; | ||
@@ -339,2 +346,5 @@ } | ||
} | ||
if (this.props.children.length === 1) { | ||
return; | ||
} | ||
@@ -382,2 +392,5 @@ this.stopAnimationLoop(); | ||
value: function handleTouchMove(e) { | ||
if (this.props.children.length === 1) { | ||
return; | ||
} | ||
if (e.touches.length > 1) { | ||
@@ -384,0 +397,0 @@ e.preventDefault();this.setState({ dragged: false });return; |
{ | ||
"name": "dotslider", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"description": "Zero effort slider / carousel component in pure react with zero dependencies", | ||
@@ -5,0 +5,0 @@ "main": "./lib/entry.dist.js", |
30312
683