Skip to content

Commit

Permalink
ensure className doesn't contain space characters (leongersen#1070)
Browse files Browse the repository at this point in the history
as HTMLElement.classList.remove does not support to remove multiple class names (separated by spaces)
  • Loading branch information
leongersen authored May 5, 2020
2 parents 159ff11 + 2d35c09 commit d6c2af7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/nouislider.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@

// http://youmightnotneedjquery.com/#remove_class
function removeClass(el, className) {
if (el.classList) {
if (el.classList && !/\s/.test(className)) {
el.classList.remove(className);
} else {
el.className = el.className.replace(
Expand Down

0 comments on commit d6c2af7

Please sign in to comment.