Skip to content

Commit

Permalink
Find dom parent
Browse files Browse the repository at this point in the history
  • Loading branch information
pomber committed Jul 23, 2019
1 parent 9b47e0f commit aaf1c9a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion didact.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,12 @@ function commitWork(fiber) {
return
}

const domParent = fiber.parent.dom
let domParentFiber = fiber.parent
while (!domParentFiber.dom) {
domParentFiber = domParentFiber.parent
}
const domParent = domParentFiber.dom

if (
fiber.effectTag === "PLACEMENT" &&
fiber.dom != null
Expand Down

0 comments on commit aaf1c9a

Please sign in to comment.