From fa63488e30a81f4370aa1e9a565b3d2331f553a6 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Tue, 22 Mar 2016 00:26:25 +0100 Subject: [PATCH] Deal with negative depths. --- www/js/remoteglot.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/www/js/remoteglot.js b/www/js/remoteglot.js index 21a995e..7ad1ff0 100644 --- a/www/js/remoteglot.js +++ b/www/js/remoteglot.js @@ -822,7 +822,11 @@ var update_refutation_lines = function() { var depth_td = document.createElement("td"); tr.appendChild(depth_td); $(depth_td).addClass("depth"); - $(depth_td).text("d" + line['depth']); + if (line['depth'] && line['depth'] >= 0) { + $(depth_td).text("d" + line['depth']); + } else { + $(depth_td).text("—"); + } var pv_td = document.createElement("td"); tr.appendChild(pv_td); -- 2.39.2