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
The Issue constructor expect some arguments in order like code, position and additional data. Some rules expect some specific format for the input and this causes sometimes the Linter to fail with the error
Cannot read property 0 of undefined
Here is an example:
For the input "foobar" which is obviously wrong html input, the Linter parse it as one text node.
If you apply the doctype-first rule, it will detect the error and create a new E007 issue but the text node does not have an openLineCol property because is not an element. This causes undefined to be passed as the pos argument causing the failure later at the issue constructor.
function Issue(code, pos, data) {
// Here pos is undefined
this.line = pos[0];
this.column = pos[1];
this.code = code;
this.data = data || {};
}
The text was updated successfully, but these errors were encountered:
The Issue constructor expect some arguments in order like code, position and additional data. Some rules expect some specific format for the input and this causes sometimes the Linter to fail with the error
Here is an example:
For the input "foobar" which is obviously wrong html input, the Linter parse it as one text node.
If you apply the
doctype-first
rule, it will detect the error and create a newE007
issue but the text node does not have anopenLineCol
property because is not an element. This causesundefined
to be passed as thepos
argument causing the failure later at the issue constructor.The text was updated successfully, but these errors were encountered: