Merge pull request #15011 from mehcode/gutter-marker-layer-bug

Check if incoming element is non-null before attempting to append to it
This commit is contained in:
Bryant Ung
2017-07-13 22:29:44 -07:00
committed by GitHub
2 changed files with 3 additions and 3 deletions

View File

@@ -3275,7 +3275,7 @@ class CustomGutterDecorationComponent {
if (newProps.className !== oldProps.className) this.element.className = newProps.className || ''
if (newProps.element !== oldProps.element) {
if (this.element.firstChild) this.element.firstChild.remove()
this.element.appendChild(newProps.element)
if (newProps.element != null) this.element.appendChild(newProps.element)
}
}
}