]> git.sesse.net Git - remoteglot/blobdiff - www/js/remoteglot.js
Fix an issue where we would sort the wrong way when browsing history.
[remoteglot] / www / js / remoteglot.js
index d89da33b3d5339f5b581c356ba2fb68af78f3389..1e899298cef2997c7392376d1fc8126c78ed1cd0 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) });