From: Benjamin Auder <benjamin.auder@somewhere>
Date: Tue, 20 Nov 2018 02:04:37 +0000 (+0100)
Subject: Attempt to fix opponent in PGN (should be OK now)
X-Git-Url: https://git.auder.net/doc/html/app_dev.php/img/%7B%7B%20pkg.url%20%7D%7D?a=commitdiff_plain;h=5e622704f17b93bf2d475f333416df921cf16410;p=vchess.git

Attempt to fix opponent in PGN (should be OK now)
---

diff --git a/public/javascripts/base_rules.js b/public/javascripts/base_rules.js
index 0868a367..a4001225 100644
--- a/public/javascripts/base_rules.js
+++ b/public/javascripts/base_rules.js
@@ -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>';