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:
parent
e9915d3da5
commit
37be0ab765
|
@ -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) => {
|
||||
|
|
Loading…
Reference in a new issue