Skip to content

Commit

Permalink
Extract into separate func
Browse files Browse the repository at this point in the history
  • Loading branch information
JoviDeCroock committed Oct 13, 2024
1 parent 5aae286 commit 5e345ac
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion benches/src/02_replace1k.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
const elementSelector = 'tr:first-child > td:first-child';

// MUST BE KEPT IN SYNC WITH WARMUP COUNT IN benches/scripts/config.js
const WARMUP_COUNT = 25;
const WARMUP_COUNT = 5;
for (let i = 0; i < WARMUP_COUNT; i++) {
markRunStart(`warmup-${i}`);
run();
Expand Down
2 changes: 0 additions & 2 deletions src/diff/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -513,8 +513,6 @@ function diffElementNodes(
}
} else {
if (oldHtml) dom.innerHTML = '';
// Previous render was a single text child. New children are not so let's
// unmount the previous text child
if (typeof oldProps.children === 'string') {
dom.removeChild(dom.firstChild);
}
Expand Down

0 comments on commit 5e345ac

Please sign in to comment.