I'm using Sentry to monitor a site, and it's been giving me this error a few times in IE11:
TypeError: Unable to get property 'length' of undefined or null reference
at y(./node_modules/what-input/dist/what-input.js:253:0)
The sourcemap points to the issue being inside this method, e.g. accessing length on classList.
var setElement = function setElement(event) {
currentElement = event.target.nodeName.toLowerCase();
docElem.setAttribute('data-whatelement', currentElement);
if (event.target.classList.length) {
docElem.setAttribute('data-whatclasses', event.target.classList.toString().replace(' ', ','));
}
};
A quick google reveals that classList is not supported on SVG elements in IE 11, which could cause this issue. Would it make sense to add a simple check to ensure that classList exists before trying to use it?
I'm using Sentry to monitor a site, and it's been giving me this error a few times in IE11:
The sourcemap points to the issue being inside this method, e.g. accessing
length
onclassList
.A quick google reveals that classList is not supported on SVG elements in IE 11, which could cause this issue. Would it make sense to add a simple check to ensure that
classList
exists before trying to use it?