Fixed class diffing
This commit is contained in:
parent
b8f52e1217
commit
405999d042
@ -99,13 +99,18 @@ export class Diff {
|
||||
|
||||
let classesA = elemA.classList
|
||||
let classesB = elemB.classList
|
||||
let removeClasses: string[] = []
|
||||
|
||||
for(let className of classesA) {
|
||||
if(!classesB.contains(className) && !Diff.persistentClasses.has(className)) {
|
||||
classesA.remove(className)
|
||||
removeClasses.push(className)
|
||||
}
|
||||
}
|
||||
|
||||
for(let className of removeClasses) {
|
||||
classesA.remove(className)
|
||||
}
|
||||
|
||||
for(let className of classesB) {
|
||||
if(!classesA.contains(className)) {
|
||||
classesA.add(className)
|
||||
|
Loading…
Reference in New Issue
Block a user