TypeError: object null is not iterable
The following test case errors out if present. It does not error out when either of the two issues are fixed:
- colon is removed from id attribute
- div is removed from p
Reduced test-case
<div id="test-id: ">
<p>
<div>
</div>
</p>
</div>
Configuration
{
"extends": ["html-validate:recommended"]
}
Expected result
Expected the document to be invalid (because there are errors).
Actual result
Validator failed with:
TypeError: object null is not iterable (cannot read property Symbol(Symbol.iterator))
at new PseudoClassMatcher (node_modules/html-validate/dist/dom/selector.js:56:32)
at Function.createMatcher (node_modules/html-validate/dist/dom/selector.js:87:24)
at node_modules/html-validate/dist/dom/selector.js:73:47
at Array.map (<anonymous>)
at new Pattern (node_modules/html-validate/dist/dom/selector.js:73:26)
at node_modules/html-validate/dist/dom/selector.js:131:38
at Array.map (<anonymous>)
at Function.parse (node_modules/html-validate/dist/dom/selector.js:131:24)
at new Selector (node_modules/html-validate/dist/dom/selector.js:101:33)
at HtmlElement.querySelectorImpl (node_modules/html-validate/dist/dom/htmlelement.js:335:29)
Version
-
html-validate
: 4.6.0
Edited by Mihkel Eidast