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) {
|
function reduceComponents (components) {
|
||||||
return components
|
return components
|
||||||
.map((c) => c.props.children)
|
.map((c) => c.props.children)
|
||||||
.filter((c) => !!c)
|
|
||||||
.map((children) => React.Children.toArray(children))
|
.map((children) => React.Children.toArray(children))
|
||||||
.reduce((a, b) => a.concat(b), [])
|
.reduce((a, b) => a.concat(b), [])
|
||||||
.reverse()
|
.reverse()
|
||||||
.concat(...defaultHead())
|
.concat(...defaultHead())
|
||||||
|
.filter((c) => !!c)
|
||||||
.filter(unique())
|
.filter(unique())
|
||||||
.reverse()
|
.reverse()
|
||||||
.map((c) => {
|
.map((c) => {
|
||||||
|
|
Loading…
Reference in a new issue