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 3d52906..bed5a5c 100644 (file)
@@ -780,6 +780,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;