Attempt to fix opponent in PGN (should be OK now)
authorBenjamin Auder <benjamin.auder@somewhere>
Tue, 20 Nov 2018 02:04:37 +0000 (03:04 +0100)
committerBenjamin Auder <benjamin.auder@somewhere>
Tue, 20 Nov 2018 02:04:37 +0000 (03:04 +0100)
public/javascripts/base_rules.js

index 0868a36..a400122 100644 (file)
@@ -1030,7 +1030,7 @@ class ChessRules
                let pgn = "";
                pgn += '[Site "vchess.club"]<br>';
                const d = new Date();
-               const opponent = this.mode=="human" ? "Anonymous" : "Computer";
+               const opponent = mode=="human" ? "Anonymous" : "Computer";
                pgn += '[Date "' + d.getFullYear() + '-' + (d.getMonth()+1) + '-' + d.getDate() + '"]<br>';
                pgn += '[White "' + (mycolor=='w'?'Myself':opponent) + '"]<br>';
                pgn += '[Black "' + (mycolor=='b'?'Myself':opponent) + '"]<br>';