X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=www%2Fjs%2Fremoteglot.js;h=4e7a2efc262d73e2d6a4dac6aeb5ea11dc410a66;hb=aae509c47c3031f26f12b5cc084d3f9b48543dd7;hp=f4bf795c240262824733631a4bbfe50c89e0d210;hpb=5a9dbd3f72666ce02396c30d1b74dae3ab32d40b;p=remoteglot diff --git a/www/js/remoteglot.js b/www/js/remoteglot.js index f4bf795..4e7a2ef 100644 --- a/www/js/remoteglot.js +++ b/www/js/remoteglot.js @@ -1647,6 +1647,9 @@ var update_move_highlight = function() { display_lines.push(current_display_line); $("#pv").html(print_pv(display_lines.length - 1)); display_line_num = display_lines.length - 1; + + // Clear out the PV, so it's not selected by anything later. + display_lines[1].pretty_pv = []; } highlighted_move = $("#automove" + display_line_num + "-" + (current_display_move - current_display_line.start_display_move_num)); @@ -2003,6 +2006,9 @@ var format_short_score = function(score) { } var format_long_score = function(score) { + if (!score) { + return "???"; + } if (score[0] === 'm') { if (score[1] > 0) { return "White mates in " + score[1];