ATLAS-4506-2-(New UI): While a glossary with large number of terms is getting loaded, search from new UI doesn't work

Signed-off-by: Pinal Shah <pinal.shah@freestoneinfotech.com>
diff --git a/dashboardv3/public/js/views/search/tree/GlossaryTreeLayoutView.js b/dashboardv3/public/js/views/search/tree/GlossaryTreeLayoutView.js
index e58b177..b01ff1f 100644
--- a/dashboardv3/public/js/views/search/tree/GlossaryTreeLayoutView.js
+++ b/dashboardv3/public/js/views/search/tree/GlossaryTreeLayoutView.js
@@ -196,7 +196,9 @@
                 this.options.value = {};
             }
             if (!this.options.value.term && this.options.value.gType != 'category') {
-                this.ui.termSearchTree.jstree(true).deselect_all();
+                if (this.ui.termSearchTree.jstree(true)) {
+                    this.ui.termSearchTree.jstree(true).deselect_all();
+                }
                 this.glossaryTermId = null;
             } else {
                 if (this.options.value.term) {