Error when className is not of type string
SebastianWachsmuth opened this issue · 3 comments
SebastianWachsmuth commented
For some DOM-Elements className is not of type string (svg for example)
In those cases .split() will throw. same error as #110
could maybe be fixed by using element.classList. it has a contains method
stavroskasidis commented
Ok thank you for reporting this. I will work on it and provide a patch.
SebastianWachsmuth commented
the simplest way, with the fewest changes is to replace line 41 and 63 with
var classes = el.classList != undefined ? el.classList : [];
stavroskasidis commented
Changed in 1.13