Fix an issue where we would sort the wrong way when browsing history.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 19 Nov 2018 20:22:23 +0000 (21:22 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 19 Nov 2018 20:22:23 +0000 (21:22 +0100)
www/js/remoteglot.js

index d89da33..1e89929 100644 (file)
@@ -796,7 +796,7 @@ var update_refutation_lines = function() {
        }
 
        var invert = (toplay === 'B');
-       if (current_display_line && current_display_move % 2 == 0) {
+       if (current_display_line && current_display_move % 2 == 0 && !current_display_line_is_history) {
                invert = !invert;
        }
        moves = moves.sort(function(a, b) { return compare_by_score(refutation_lines, invert, a, b) });