From a31a32e4ea03771986192c536141c9f276a41d08 Mon Sep 17 00:00:00 2001 From: Alon Levy Date: Sun, 26 Oct 2014 21:14:43 +0200 Subject: textanalysis: protect from temp nodes on finalize (all these patches - need to rewrite that and heavily test it) --- scripts/textanalysis.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'scripts/textanalysis.js') 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]; -- cgit v1.3.1