diff --git a/public/javascripts/big.js b/public/javascripts/big.js index d85f75e10e..ad8acf3b16 100644 --- a/public/javascripts/big.js +++ b/public/javascripts/big.js @@ -2130,7 +2130,7 @@ lichess.storage = { name: "analyse" }, params: { - ran: "--ranph--", + ran: "--ranph--" }, receive: function(t, d) { analyse.socketReceive(t, d); diff --git a/ui/analyse/src/analyse.js b/ui/analyse/src/analyse.js index f4ff06672e..7c2d446ccd 100644 --- a/ui/analyse/src/analyse.js +++ b/ui/analyse/src/analyse.js @@ -38,9 +38,10 @@ module.exports = function(steps, analysis) { }); if (curStep) { curStep.variations = curStep.variations || []; - if (curStep.san === step.san) return false;; + if (curStep.san === step.san) return nextPath; for (var i = 0; i < curStep.variations.length; i++) { - if (curStep.variations[i][0].san === step.san) return false; + if (curStep.variations[i][0].san === step.san) + return treePath.withVariation(nextPath, i + 1); } curStep.variations.push([step]); return treePath.withVariation(nextPath, curStep.variations.length); diff --git a/ui/analyse/src/ctrl.js b/ui/analyse/src/ctrl.js index 480df8b096..a41e42afa1 100644 --- a/ui/analyse/src/ctrl.js +++ b/ui/analyse/src/ctrl.js @@ -127,7 +127,6 @@ module.exports = function(opts) { this.addStep = function(step, path) { var newPath = this.analyse.addStep(step, treePath.read(path)); - if (!newPath) return; this.jump(newPath); m.redraw(); this.chessground.playPremove();