Unverified Commit d6090178 authored by Jiachi Liu's avatar Jiachi Liu Committed by GitHub

Fix: convert head instances to array (#38252)

* fix: convert head instances to array

* fix test
parent 274980f0
......@@ -23,8 +23,8 @@ export default function SideEffect(props: SideEffectProps) {
function emitChange() {
if (headManager && headManager.mountedInstances) {
const headElements = Children.toArray(
headManager.mountedInstances
).filter(Boolean) as React.ReactElement[]
Array.from(headManager.mountedInstances as Set<unknown>).filter(Boolean)
) as React.ReactElement[]
headManager.updateHead(reduceComponentsToState(headElements, props))
}
}
......
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