Chalarangelo / furl

Functional react.js components.

Home Page:https://furl.netlify.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

item.type is undefined

Chalarangelo opened this issue · comments

It seems like some components that filter their children might end up getting item.type equal to undefined.

I have seen this happen when a component that applies a filter contains children separated by a space on the same line.

Possible solution

Replace all instances of item.type.name === ComponentX.name with a more robust check which checks item.type && item.type.name && item.type.name === ComponentX.name instead. This will safeguard against this particular problem and possibly others in the future.