From d0588cd812de3706e5fe193ab1d71c00f41deb67 Mon Sep 17 00:00:00 2001 From: Ryan Leckey Date: Thu, 13 Jul 2017 02:32:43 -0700 Subject: [PATCH] Check if incoming element is non-null before attempting to append to it --- src/text-editor-component.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/text-editor-component.js b/src/text-editor-component.js index 037e45462..dd11884cc 100644 --- a/src/text-editor-component.js +++ b/src/text-editor-component.js @@ -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) } } }