Skip to content

Commit

Permalink
Fix initial paint rules being ignored for client-rendered applications (
Browse files Browse the repository at this point in the history
fixes #16)
  • Loading branch information
developit committed Oct 28, 2020
1 parent bfc27a4 commit fa3b266
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -869,7 +869,10 @@ function init() {
if ((added = record.addedNodes)) {
for (let j = 0; j < added.length; j++) {
if (added[j].nodeType === 1) {
queueUpdate(added[j]);
// Newly inserted elements can contain entire subtrees
// if constructed before the root is attached. Only the root
// emits a mutation, so we have to visit all children:
walk(added[j], queueUpdate);
}
}
}
Expand Down

0 comments on commit fa3b266

Please sign in to comment.