fix issue with doudizhu game replay
This commit is contained in:
parent
8be57eef48
commit
8e841f3ae7
|
@ -134,6 +134,8 @@ class DoudizhuGameBoard extends React.Component {
|
|||
<div style={{ marginRight: '2em' }} className={'timer ' + fadeClassName}>
|
||||
<div className="timer-text">{millisecond2Second(this.props.considerationTime)}</div>
|
||||
</div>
|
||||
{this.props.gamePlayable ?
|
||||
(<>
|
||||
<Button
|
||||
onClick={() => {
|
||||
this.props.handleMainPlayerAct('deselect');
|
||||
|
@ -156,7 +158,7 @@ class DoudizhuGameBoard extends React.Component {
|
|||
Pass
|
||||
</Button>
|
||||
<Button
|
||||
disabled={this.props.selectedCards.length === 0}
|
||||
disabled={!this.props.selectedCards || this.props.selectedCards.length === 0}
|
||||
onClick={() => {
|
||||
this.props.handleMainPlayerAct('play');
|
||||
}}
|
||||
|
@ -165,6 +167,10 @@ class DoudizhuGameBoard extends React.Component {
|
|||
>
|
||||
Play
|
||||
</Button>
|
||||
</>)
|
||||
:
|
||||
undefined}
|
||||
|
||||
</div>
|
||||
);
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue