tangled
alpha
login
or
join now
yippee.fun
/
morphlex
0
fork
atom
Precise DOM morphing
morphing
typescript
dom
0
fork
atom
overview
issues
pulls
pipelines
remove redundant id check in exact-id matching
joel.drapper.me
2 weeks ago
c7ab8af8
c50f4fb4
+2
-4
1 changed file
expand all
collapse all
unified
split
src
morphlex.ts
+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
0
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]) {
0
587
matches[unmatchedIndex] = candidateIndex
588
op[unmatchedIndex] = Operation.SameElement
589
candidateElementWithIdActive[candidateIndex] = 0