From c6ffca52b75480ad51ff1907a990b02f64885476 Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Sat, 20 Jun 2020 13:14:29 -0700 Subject: [PATCH 1/1] Fix bug where second players first move was forced to match first player's When the last_two_moves array has only one entry in it, then index 0 is the last move, not two moves ago, so we don't actually want to look at that. --- scribe/scribe.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scribe/scribe.jsx b/scribe/scribe.jsx index 0792077..2cc5148 100644 --- a/scribe/scribe.jsx +++ b/scribe/scribe.jsx @@ -405,7 +405,7 @@ class Board extends React.Component { let active = false; if (this.props.active) { active = true; - if (this.props.last_two_moves[0]) { + if (this.props.last_two_moves.length > 1) { /* First index (0) gives us our last move, (that is, of the * last two moves, it's the first one, so two moves ago). * -- 2.43.0