You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TypeError: classList.indexOf is not a function
at eval (v-tooltip.esm.js?455e:2456)
at Array.forEach ()
at addClasses (v-tooltip.esm.js?455e:2455)
at createTooltip (v-tooltip.esm.js?455e:3382)
at bind (v-tooltip.esm.js?455e:3414)
at callHook$1 (vue.esm.js?65d7:5855)
at _update (vue.esm.js?65d7:5780)
at Array.updateDirectives (vue.esm.js?65d7:5761)
at invokeCreateHooks (vue.esm.js?65d7:5299)
at createElm (vue.esm.js?65d7:5190)
v-tooltip version: v-tooltip@2.0.0-rc.22
I had to fix it again locally:
/**
Add classes to an element.
This method checks to ensure that the classes don't already exist before adding them.
It uses el.className rather than classList in order to be IE friendly.
@param {object} el - The element to add the classes to.
@param {classes} string - List of space separated classes to be added to the element.
*/
function addClasses(el, classes) {
const newClasses = convertToArray(classes)
let classList = null
if (el instanceof SVGElement) {
classList = Array.from(el.className)
} else {
classList = convertToArray(el.className)
}
newClasses.forEach((newClass) => {
if (classList.indexOf(newClass) === -1) {
classList.push(newClass)
}
})
if (el instanceof SVGElement) {
el.setAttribute('class', classList.join(' '))
} else {
el.className = classList.join(' ')
}
}
/**
Remove classes from an element.
It uses el.className rather than classList in order to be IE friendly.
@param {any} el The element to remove the classes from.
@param {any} classes List of space separated classes to be removed from the element.
*/
function removeClasses(el, classes) {
var newClasses = convertToArray(classes);
let classList = null
if (el instanceof SVGElement) {
classList = Array.from(el.className);
} else {
classList = convertToArray(el.className);
}
newClasses.forEach(function (newClass) {
var index = classList.indexOf(newClass);
if (index !== -1) {
classList.splice(index, 1);
}
});
if (el instanceof SVGElement) {
el.setAttribute('class', classList.join(' '));
} else {
el.className = classList.join(' ');
}
}
Thanks
The text was updated successfully, but these errors were encountered:
TypeError: classList.indexOf is not a function
at eval (v-tooltip.esm.js?455e:2456)
at Array.forEach ()
at addClasses (v-tooltip.esm.js?455e:2455)
at createTooltip (v-tooltip.esm.js?455e:3382)
at bind (v-tooltip.esm.js?455e:3414)
at callHook$1 (vue.esm.js?65d7:5855)
at _update (vue.esm.js?65d7:5780)
at Array.updateDirectives (vue.esm.js?65d7:5761)
at invokeCreateHooks (vue.esm.js?65d7:5299)
at createElm (vue.esm.js?65d7:5190)
v-tooltip version: v-tooltip@2.0.0-rc.22
I had to fix it again locally:
/**
*/
function addClasses(el, classes) {
const newClasses = convertToArray(classes)
let classList = null
if (el instanceof SVGElement) {
classList = Array.from(el.className)
} else {
classList = convertToArray(el.className)
}
newClasses.forEach((newClass) => {
if (classList.indexOf(newClass) === -1) {
classList.push(newClass)
}
})
if (el instanceof SVGElement) {
el.setAttribute('class', classList.join(' '))
} else {
el.className = classList.join(' ')
}
}
/**
*/
function removeClasses(el, classes) {
var newClasses = convertToArray(classes);
let classList = null
if (el instanceof SVGElement) {
classList = Array.from(el.className);
} else {
classList = convertToArray(el.className);
}
newClasses.forEach(function (newClass) {
var index = classList.indexOf(newClass);
if (index !== -1) {
classList.splice(index, 1);
}
});
if (el instanceof SVGElement) {
el.setAttribute('class', classList.join(' '));
} else {
el.className = classList.join(' ');
}
}
Thanks
The text was updated successfully, but these errors were encountered: