Bug fixes and tests for switches

This commit is contained in:
Behind The Math
2018-03-20 21:32:01 -04:00
parent 39a96e51e7
commit b3f7fcefee
2 changed files with 62 additions and 1 deletions

View File

@@ -8,7 +8,14 @@ module.exports = {
innerHTML: function(oldEl, newEl) {
oldEl.innerHTML = newEl.innerHTML
oldEl.className = newEl.className
if (newEl.className === "") {
oldEl.removeAttribute("class")
}
else {
oldEl.className = newEl.className
}
this.onSwitch()
},