summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Levy <alon@pobox.com>2014-10-26 21:14:43 +0200
committerAlon Levy <alon@pobox.com>2014-10-26 21:14:43 +0200
commita31a32e4ea03771986192c536141c9f276a41d08 (patch)
tree4db998d04e7df40130e37e989d977a170eb42de3
parent078b019b26c750fac166a8126193bf2580344f14 (diff)
textanalysis: protect from temp nodes on finalize (all these patches - need to rewrite that and heavily test it)
-rw-r--r--scripts/textanalysis.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/textanalysis.js b/scripts/textanalysis.js
index e61bad6d..e473142b 100644
--- a/scripts/textanalysis.js
+++ b/scripts/textanalysis.js
@@ -401,7 +401,11 @@ var textAnalyser2 = function (newtext, finalize) {
graph.removeLinks("temp");
for (k in ret.nodes) {
n = ret.nodes[k];
- graph.addNode(n.id, n.type, n.state);
+ if (n.state == 'temp' && finalize) {
+ console.log('bug: temp node creation on finalize');
+ } else {
+ graph.addNode(n.id, n.type, n.state);
+ }
}
for (k in ret.links) {
l = ret.links[k];