From b41458a32bb6393591004219c0adf4c2844ee1ca Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sun, 25 Dec 2022 18:09:06 +0100 Subject: [PATCH] Fix some issues with exploring the wrong lines, especially when the backend probes fail. --- www/js/remoteglot.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/www/js/remoteglot.js b/www/js/remoteglot.js index 3ebba93..b06a45a 100644 --- a/www/js/remoteglot.js +++ b/www/js/remoteglot.js @@ -839,6 +839,8 @@ let update_refutation_lines = function() { tbl.replaceChildren(); if (display_lines.length < 2) { + // Update the move highlight, as we've rewritten all the HTML. + update_move_highlight(); return; } @@ -2020,7 +2022,11 @@ let explore_hash = function(fen) { fetch(backend_hash_url + "?fen=" + fen, { signal }) .then((response) => response.json()) .then((data) => { show_explore_hash_results(data, fen); }) - .catch((err) => {}); + .catch((err) => { + // Truncate the lines, since we already cleared the display. + display_lines = [ display_lines[0], display_lines[1] ]; + update_move_highlight(); + }); } /** Process the JSON response from a hash probe request. -- 2.39.2