Skip to content

Commit ed2fea9

Browse files
committed
issue 1430
1 parent aba5740 commit ed2fea9

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/pure.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff 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, {

0 commit comments

Comments
 (0)