mirror of
https://github.com/atom/atom.git
synced 2026-01-24 14:28:14 -05:00
Check if incoming element is non-null before attempting to append to it
This commit is contained in:
@@ -3271,7 +3271,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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user