]> git.sesse.net Git - remoteglot/blobdiff - www/js/remoteglot.js
Add a last-ditch resort for format_long_score(), if anything goes wrong.
[remoteglot] / www / js / remoteglot.js
index f4bf795c240262824733631a4bbfe50c89e0d210..a991a0242388fc3bee32b2f9143143869dff825a 100644 (file)
@@ -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];