Cache statistics more reliably. Fixes #2357

This commit is contained in:
Murtuza Zabuawala 2017-06-05 17:01:03 +01:00 committed by Dave Page
parent 12fa023c6d
commit a4d86d24e6

View File

@ -187,11 +187,15 @@ define([
// Avoid unnecessary reloads
var treeHierarchy = node.getTreeNodeHierarchy(item);
if (_.isEqual($(panel[0]).data('node-prop'), treeHierarchy)) {
var cache_flag = {
node_type: node_type,
url: url
};
if (_.isEqual($(panel[0]).data('node-prop'), cache_flag)) {
return;
}
// Cache the current IDs for next time
$(panel[0]).data('node-prop', treeHierarchy);
$(panel[0]).data('node-prop', cache_flag);
if (node.hasStatistics) {
msg = '';