summaryrefslogtreecommitdiff
path: root/frontend/src/containers/gameBrowser.js
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/src/containers/gameBrowser.js')
-rw-r--r--frontend/src/containers/gameBrowser.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/frontend/src/containers/gameBrowser.js b/frontend/src/containers/gameBrowser.js
index 6a6b3ce2..5db3c1cb 100644
--- a/frontend/src/containers/gameBrowser.js
+++ b/frontend/src/containers/gameBrowser.js
@@ -30,7 +30,7 @@ class GameBrowser extends Component {
>
</InlineForm>
<Space auto />
- <Text><b>Username:</b> {this.props.currentPlayer.get('displayName')}</Text>
+ <Text><b>Username:</b> {this.props.currentPlayer && this.props.currentPlayer.displayName}</Text>
<Space x={1} />
</Flex>
<GameList games={this.props.games} joinGame={this.props.joinGame}/>
@@ -43,7 +43,7 @@ import { getCurrentPlayer } from '../redux/players'
import { getAllGames, actions } from '../redux/games'
const mapStateToProps = (state) => ({
- currentPlayer: getCurrentPlayer(state),
+ currentPlayer: getCurrentPlayer(state) || {displayName: '[ERROR]'},
games: getAllGames(state)
})
bgstack15