From: Steinar H. Gunderson Date: Tue, 22 Mar 2016 21:29:35 +0000 (+0100) Subject: Add a last-ditch resort for format_long_score(), if anything goes wrong. X-Git-Url: https://git.sesse.net/?p=remoteglot;a=commitdiff_plain;h=b747ed2766d3409da9c0330f7ae011b5f24bede2;ds=sidebyside Add a last-ditch resort for format_long_score(), if anything goes wrong. --- 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];