Skip to content

Commit

Permalink
tagName has to match as well
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelWest22 committed Dec 22, 2024
1 parent 2496aae commit b44ceff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/idiomorph.js
Original file line number Diff line number Diff line change
Expand Up @@ -1207,10 +1207,10 @@ var Idiomorph = (function () {
let matchIdSet = new Set();
let oldIdSet = new Set();
for (const oldNode of nodesWithIds(oldContent)) {
oldIdSet.add(oldNode.id);
oldIdSet.add(oldNode.id+':'+oldNode.tagName);
}
for (const newNode of nodesWithIds(newContent)) {
if (oldIdSet.has(newNode.id)) {
if (oldIdSet.has(newNode.id+':'+newNode.tagName)) {
matchIdSet.add(newNode.id);
}
}
Expand Down

0 comments on commit b44ceff

Please sign in to comment.