The classList.add method actually crashes when given an empty string (or a string with just white spaces). closes #530