refactor(Compiler): misc cleanup

This commit is contained in:
Victor Berchet
2017-01-04 13:59:43 -08:00
committed by Matias Niemelä
parent d43e5dd44d
commit 83d0ff6d13
34 changed files with 69 additions and 98 deletions

View File

@ -283,7 +283,7 @@ class _TreeBuilder {
const tagDef = this.getTagDefinition(el.name);
const {parent, container} = this._getParentElementSkippingContainers();
if (isPresent(parent) && tagDef.requireExtraParent(parent.name)) {
if (parent && tagDef.requireExtraParent(parent.name)) {
const newParent = new html.Element(
tagDef.parentToAdd, [], [], el.sourceSpan, el.startSourceSpan, el.endSourceSpan);
this._insertBeforeContainer(parent, container, newParent);