1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00

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

This commit is contained in:
Guillermo Rauch 2017-05-22 12:58:54 -07:00
parent e9915d3da5
commit 37be0ab765

View file

@ -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) => {