optimal-select
optimal-select copied to clipboard
Uncaught TypeError: Cannot convert undefined or null to object
I'm trying to define a function for the ignore tag property like so:
var selector = OptimalSelect.select(e.target, {
ignore: {
tag: function(predicate, name) {
return (/html|body/).test(name)
}
}
});
It's working, but throwing an error
Uncaught TypeError: Cannot convert undefined or null to object
at Function.keys (<anonymous>)
at findAttributesPattern (match.js:139)
at findPattern (match.js:257)
at match (match.js:100)
at getSingleSelector (select.js:33)
at Object.getQuerySelector (select.js:144)
at HTMLDocument.document.addEventListener (index.html:40)
My end goal is to not select top level elements like document, html, body.
Anyone have any input on this?
Will take a look the next days and will fix it.
Was this ever fixed? I'm getting the exact same problem.