Commit c6095d64 authored by Matthew Taylor's avatar Matthew Taylor

separate out arrows var from settings object

seems to be returning false when it shouldn't. When I was testing before it appears I was getting a cached js, so it didn't actually work.
parent 9e9dc022
......@@ -23,7 +23,6 @@ var Carousel = React.createClass({
render: function () {
var settings = this.props.settings || {};
defaults(settings, {
arrows: this.props.items.length > settings.slidesToShow,
dots: false,
infinite: false,
lazyLoad: true,
......@@ -31,9 +30,10 @@ var Carousel = React.createClass({
slidesToScroll: 5,
variableWidth: true
});
var arrows = this.props.items.length > settings.slidesToShow;
return (
<Slider className={'carousel ' + this.props.className} {... settings}>
<Slider className={'carousel ' + this.props.className} arrows={arrows} {... settings}>
{this.props.items.map(function (item) {
var href = '';
switch (item.type) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment