Deal with negative depths.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 21 Mar 2016 23:26:25 +0000 (00:26 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 21 Mar 2016 23:26:25 +0000 (00:26 +0100)
www/js/remoteglot.js

index 21a995e..7ad1ff0 100644 (file)
@@ -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);