From: Steinar H. Gunderson Date: Mon, 21 Mar 2016 23:26:25 +0000 (+0100) Subject: Deal with negative depths. X-Git-Url: https://git.sesse.net/?p=remoteglot;a=commitdiff_plain;h=fa63488e30a81f4370aa1e9a565b3d2331f553a6;ds=sidebyside Deal with negative depths. --- 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);