From 79dd8d16fafda6356b61b8ac3fa2d1606c6af43b Mon Sep 17 00:00:00 2001
From: jsalyers <jsalyers@syncad.com>
Date: Thu, 6 Aug 2020 16:17:33 -0400
Subject: [PATCH] [JES] Observer wasn't checking if a component was null before
 trying to observe it

---
 src/app/components/utils/ReactMutationObserver.jsx | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/app/components/utils/ReactMutationObserver.jsx b/src/app/components/utils/ReactMutationObserver.jsx
index c81e0af4d..d625b723c 100644
--- a/src/app/components/utils/ReactMutationObserver.jsx
+++ b/src/app/components/utils/ReactMutationObserver.jsx
@@ -94,7 +94,10 @@ class ReactMutationObserver extends React.Component {
     }
 
     initObserver(componentElement) {
-        if (typeof MutationObserver !== 'undefined') {
+        if (
+            typeof MutationObserver !== 'undefined' &&
+            componentElement !== null
+        ) {
             this.observer.observe(componentElement, this.observerConfig);
         }
     }
-- 
GitLab