]> git.sesse.net Git - remoteglot/blobdiff - www/js/remoteglot.js
Fix move highlights when collapsing/uncollapsing history.
[remoteglot] / www / js / remoteglot.js
index 3d5290699366ff42ab8e0b7acb657fa94f0fee97..2ba3fe95248401613e28c4498dbdcf1ba1c0f6a7 100644 (file)
@@ -754,6 +754,7 @@ var update_history = function() {
                        '(<a class="move" href="javascript:collapse_history(true)">collapse</a>) ' +
                        print_pv(0));
        }
+       update_move_highlight();
 }
 
 /**
@@ -780,6 +781,10 @@ var update_refutation_lines = function() {
        var tbl = $("#refutationlines");
        tbl.empty();
 
+       if (display_lines.length < 2) {
+               return;
+       }
+
        // Find out where the lines start from.
        var base_line = [];
        var base_scores = display_lines[1].scores;