From b747ed2766d3409da9c0330f7ae011b5f24bede2 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Tue, 22 Mar 2016 22:29:35 +0100 Subject: [PATCH] Add a last-ditch resort for format_long_score(), if anything goes wrong. --- www/js/remoteglot.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/www/js/remoteglot.js b/www/js/remoteglot.js index f4bf795..a991a02 100644 --- a/www/js/remoteglot.js +++ b/www/js/remoteglot.js @@ -2003,6 +2003,9 @@ var format_short_score = function(score) { } var format_long_score = function(score) { + if (!score) { + return "???"; + } if (score[0] === 'm') { if (score[1] > 0) { return "White mates in " + score[1]; -- 2.39.2