sghall/react-compound-slider

Cannot read property 'type' of null error in 3.1.0

Closed this issue · 2 comments

Problem or feature description:

After I updated dependencies, slider was crushed with
TypeError: Cannot read property 'type' of null
/Slider/Slider.tsx:40
const type = (item as RCSComponent).type;

Steps to reproduce (for problems):

if withTicks is false

{withTicks && <Ticks count={tickCount}>
                {({ ticks }) => (
                    <div className="ticks">
                        {ticks.map(tick => (
                            <Tick key={tick.id} tick={tick} count={ticks.length} />
                        ))}
                    </div>
                )}
            </Ticks>}

If I render variable with null instead of component, error is also displayed

React-Compound-Slider: 3.1.0 from npm

Thanks for reporting. I'll get a fix out for this. Looks like #127

Released version 3.1.1 which should fix this issue. Please let me know if it doesn't.