When any of the docked tab(statistics, dependents & dependencies)

are clicked without selecting any tree node. it gives error in browser
console panel.
Because the node passed is undefined. and check is missing. This is now
fixed by adding check for node passed.
This commit is contained in:
Surinder Kumar 2016-06-08 12:46:30 +01:00 committed by Dave Page
parent 47dccec915
commit a871b15fe9
2 changed files with 9 additions and 0 deletions

View File

@ -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);

View File

@ -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