]> git.sesse.net Git - remoteglot/commitdiff
Fix a crash bug when looking at old moves with no analysis.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 5 Sep 2019 19:36:07 +0000 (21:36 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 5 Sep 2019 19:36:07 +0000 (21:36 +0200)
www/js/remoteglot.js

index 3d5290699366ff42ab8e0b7acb657fa94f0fee97..bed5a5cdf8ad3d1fdd4de3eb9cff1f8b39d17b4b 100644 (file)
@@ -780,6 +780,10 @@ var update_refutation_lines = function() {
        var tbl = $("#refutationlines");
        tbl.empty();
 
        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;
        // Find out where the lines start from.
        var base_line = [];
        var base_scores = display_lines[1].scores;