File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -283,14 +283,15 @@ function render(
283283 // they're passing us a custom container or not.
284284 mountedContainers . add ( container )
285285 } else {
286- mountedRootEntries . forEach ( rootEntry => {
286+ const rootEntry = mountedRootEntries . find (
287+ rootEntry => rootEntry . container === container
288+ )
287289 // Else is unreachable since `mountedContainers` has the `container`.
288290 // Only reachable if one would accidentally add the container to `mountedContainers` but not the root to `mountedRootEntries`
289291 /* istanbul ignore else */
290- if ( rootEntry . container === container ) {
291- root = rootEntry . root
292- }
293- } )
292+ if ( rootEntry ) {
293+ root = rootEntry . root
294+ }
294295 }
295296
296297 return renderRoot ( ui , {
You can’t perform that action at this time.
0 commit comments