From fc3a49ce6b33e2fc74051a51cbdf16fbfed25583 Mon Sep 17 00:00:00 2001 From: Thomas Hintz Date: Tue, 7 Apr 2020 09:25:54 -0700 Subject: [PATCH] Fixing trade to show the correct player. --- src/components/farm/Board.jsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/components/farm/Board.jsx b/src/components/farm/Board.jsx index f0c9e22..143d9cd 100644 --- a/src/components/farm/Board.jsx +++ b/src/components/farm/Board.jsx @@ -584,7 +584,7 @@ class TradeContainer2 extends React.Component { prevProps.game.otherPlayers.length !== this.props.game.otherPlayers.length) { this.setState({ otherPlayer: findPlayer(this.props.game, this.props.game.otherPlayers.length > 0 ? this.props.game.otherPlayers[0].player.name : '') }); - } else if (this.state.otherPlayer && this.state.otherPlayer !== findPlayer(this.props.game, this.state.otherPlayer.name)) { + } else if (this.state.otherPlayer && this.state.otherPlayer.name !== findPlayer(this.props.game, this.state.otherPlayer.name).name) { this.setState({ otherPlayer: findPlayer(this.props.game, this.state.otherPlayer.name) }); } if (prevProps.player.trade.originator && !this.props.player.trade.originator) { @@ -812,9 +812,13 @@ class TradeContainer2 extends React.Component { {' '} ))} - {this.props.game.otherPlayers.map(p => ( - + ))}