From 6b8c1db6406fcfd159e9f29c3b7657ff310a0ebe Mon Sep 17 00:00:00 2001 From: Thibault Duplessis Date: Thu, 21 Jan 2016 16:31:41 +0700 Subject: [PATCH] fix live miniboard crazyhouse lastmove - closes #1500 --- public/javascripts/big.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/public/javascripts/big.js b/public/javascripts/big.js index e9fc267093..d2e61097a9 100644 --- a/public/javascripts/big.js +++ b/public/javascripts/big.js @@ -629,7 +629,11 @@ lichess.unique = function(xs) { $elem.each(function() { var $this = $(this).removeClass('parse_fen'); var lm = $this.data('lastmove'); - var lastMove = lm ? [lm[0] + lm[1], lm[2] + lm[3]] : []; + var lastMove = []; + if (lm) { + if (lm[1] === '@') lastMove = [lm.slice(2), lm.slice(2)]; + else lm = [lm[0] + lm[1], lm[2] + lm[3]]; + } var color = $this.data('color') || lichess.readServerFen($(this).data('y')); var ground = $this.data('chessground'); var playable = $this.data('playable');