fix(HTMLParser): properly report errors for not properly closed tags (#8999)

Fixes #7849
This commit is contained in:
Pawel Kozlowski
2016-06-03 19:49:17 +02:00
committed by Miško Hevery
parent fe8a7b0e82
commit 6f281ab3c4
2 changed files with 9 additions and 1 deletions

View File

@ -295,7 +295,9 @@ class TreeBuilder {
var fullName =
getElementFullName(endTagToken.parts[0], endTagToken.parts[1], this._getParentElement());
this._getParentElement().endSourceSpan = endTagToken.sourceSpan;
if (this._getParentElement()) {
this._getParentElement().endSourceSpan = endTagToken.sourceSpan;
}
if (getHtmlTagDefinition(fullName).isVoid) {
this.errors.push(