You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Results in this error Error: React.cloneElement(...): The argument must be a React element, but you passed null.
I believe it is because in the render for source, the children are iterated over using React.children.map as seen in lines 139 through 142. When the inline conditional is false, the resulting React.children element is null, which is then passed to React.cloneElement.
Results in this error
Error: React.cloneElement(...): The argument must be a React element, but you passed null.
I believe it is because in the render for source, the children are iterated over using
React.children.map
as seen in lines 139 through 142. When the inline conditional is false, the resultingReact.children
element isnull
, which is then passed toReact.cloneElement
.react-map-gl/src/components/source.js
Lines 133 to 144 in 978dd0a
Here is the issue that talks about
React.children.map
andnull
values.facebook/react#4867
I think a possible solution is to use
React.children.toArray
which will filter outnull
andundefined
values.The text was updated successfully, but these errors were encountered: