X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fvariants%2FOtage.js;h=938ef0ee054e80c24a26f4f08249d349bcb4d513;hb=afcfb85255ee152e3d6bced74260f586ced0f3e8;hp=4cfe1e7aa612d556335e153eedc23836caf16a76;hpb=0709b5f40a4ed8bf8c0602e169950b2ea578d180;p=vchess.git diff --git a/client/src/variants/Otage.js b/client/src/variants/Otage.js index 4cfe1e7a..938ef0ee 100644 --- a/client/src/variants/Otage.js +++ b/client/src/variants/Otage.js @@ -799,8 +799,13 @@ export class OtageRules extends ChessRules { // Add potential promotion indications: const firstLastRank = (c == 'w' ? [7, 0] : [0, 7]); if (move.end.x == firstLastRank[1] && piece == V.PAWN) { - const up = this.getUnionPieces(move.appear[0].c, move.appear[0].p); - notation += "=" + up[c].toUpperCase(); + notation += "="; + if (ChessRules.PIECES.includes(move.appear[0].p)) + notation += move.appear[0].p.toUpperCase(); + else { + const up = this.getUnionPieces(move.appear[0].c, move.appear[0].p); + notation += up[c].toUpperCase(); + } } else if ( move.end.x == firstLastRank[0] &&