Commit 37be0ab7 authored by Guillermo Rauch's avatar Guillermo Rauch

filter for null *after* `Children` is called to make this work with some `-compat` pollyfills

parent e9915d3d
......@@ -19,11 +19,11 @@ export function defaultHead () {
function reduceComponents (components) {
return components
.map((c) => c.props.children)
.filter((c) => !!c)
.map((children) => React.Children.toArray(children))
.reduce((a, b) => a.concat(b), [])
.reverse()
.concat(...defaultHead())
.filter((c) => !!c)
.filter(unique())
.reverse()
.map((c) => {
......
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