From 13e362a1dfe53128a2d95f6653f89e24151a9a97 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Tue, 24 Feb 2015 13:37:02 -0500 Subject: [PATCH] JS NPE fix --- static/js/graphing.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/static/js/graphing.js b/static/js/graphing.js index 18bb09496..60e7d1b33 100644 --- a/static/js/graphing.js +++ b/static/js/graphing.js @@ -521,6 +521,11 @@ ImageHistoryTree.prototype.pruneUnreferenced_ = function(node) { } node.children = surviving_children; } + + if (!node.tags) { + return node.children.length == 0; + } + return (node.children.length == 0 && node.tags.length == 0); };