diff --git a/web/pgadmin/misc/depends/static/js/depends.js b/web/pgadmin/misc/depends/static/js/depends.js index c92085eec..d7534c882 100644 --- a/web/pgadmin/misc/depends/static/js/depends.js +++ b/web/pgadmin/misc/depends/static/js/depends.js @@ -236,6 +236,9 @@ define( * through. We will wait for some time before fetching the Dependents **/ var self = this; + if (!node) { + return; + } self.dependent = true; if (self.timeout) { clearTimeout(self.timeout); @@ -275,6 +278,9 @@ define( * through. We will wait for some time before fetching the Dependencies **/ var self = this; + if (!node) { + return; + } self.dependent = false; if (self.timeout) { clearTimeout(self.timeout); diff --git a/web/pgadmin/misc/statistics/static/js/statistics.js b/web/pgadmin/misc/statistics/static/js/statistics.js index 0e656bb10..019902b19 100644 --- a/web/pgadmin/misc/statistics/static/js/statistics.js +++ b/web/pgadmin/misc/statistics/static/js/statistics.js @@ -218,6 +218,9 @@ function(_, $, pgBrowser, Backgrid) { showStatistics: function(item, data, node) { var self = this; + if (!node) { + return; + } /** * We can't start fetching the statistics immediately, it is possible - * the user is just using keyboards to select the node, and just