Precise DOM morphing
morphing typescript dom

remove redundant id check in exact-id matching

+2 -4
+2 -4
src/morphlex.ts
··· 570 for (let c = 0; c < candidateBucket.length; c++) { 571 const candidateIndex = candidateBucket[c]! 572 if (!candidateElementWithIdActive[candidateIndex]) continue 573 - const candidate = fromChildNodes[candidateIndex] as Element 574 575 - if (localNameMap[unmatchedIndex] === candidateLocalNameMap[candidateIndex] && id === candidate.id) { 576 matches[unmatchedIndex] = candidateIndex 577 op[unmatchedIndex] = Operation.SameElement 578 candidateElementWithIdActive[candidateIndex] = 0 ··· 584 const candidateIndex = candidateBucket 585 if (!candidateElementWithIdActive[candidateIndex]) continue 586 587 - const candidate = fromChildNodes[candidateIndex] as Element 588 - if (localNameMap[unmatchedIndex] === candidateLocalNameMap[candidateIndex] && id === candidate.id) { 589 matches[unmatchedIndex] = candidateIndex 590 op[unmatchedIndex] = Operation.SameElement 591 candidateElementWithIdActive[candidateIndex] = 0
··· 570 for (let c = 0; c < candidateBucket.length; c++) { 571 const candidateIndex = candidateBucket[c]! 572 if (!candidateElementWithIdActive[candidateIndex]) continue 573 574 + if (localNameMap[unmatchedIndex] === candidateLocalNameMap[candidateIndex]) { 575 matches[unmatchedIndex] = candidateIndex 576 op[unmatchedIndex] = Operation.SameElement 577 candidateElementWithIdActive[candidateIndex] = 0 ··· 583 const candidateIndex = candidateBucket 584 if (!candidateElementWithIdActive[candidateIndex]) continue 585 586 + if (localNameMap[unmatchedIndex] === candidateLocalNameMap[candidateIndex]) { 587 matches[unmatchedIndex] = candidateIndex 588 op[unmatchedIndex] = Operation.SameElement 589 candidateElementWithIdActive[candidateIndex] = 0