Fix validation issue causing statistics tab to break if no node is selected on browser tree and user clicks on statistics tab.

This commit is contained in:
Murtuza Zabuawala 2016-06-08 12:48:34 +01:00 committed by Dave Page
parent a871b15fe9
commit 47007076cc

View File

@ -229,15 +229,17 @@ function(_, $, pgBrowser, Backgrid) {
* We will wait for some time before fetching the statistics for the
* selected node.
**/
if (self.timeout) {
clearTimeout(self.timeout);
}
self.timeout = setTimeout(
function() {
self.__updateCollection.call(
self, node.generate_url(item, 'stats', data, true), node
);
}, 400);
if (node) {
if (self.timeout) {
clearTimeout(self.timeout);
}
self.timeout = setTimeout(
function() {
self.__updateCollection.call(
self, node.generate_url(item, 'stats', data, true), node
);
}, 400);
}
},
__createMultiLineStatistics: function(data) {