fix(overlay): infinite loading when show player stats is off
All checks were successful
deploy / deploy (push) Successful in 58s
All checks were successful
deploy / deploy (push) Successful in 58s
This commit is contained in:
parent
22dfb56167
commit
6b0f1bf5ce
@ -70,7 +70,10 @@ export default class Overlay extends Component<OverlayProps, OverlayState> {
|
||||
render() {
|
||||
const { player } = this.state;
|
||||
|
||||
if (!this.state.mounted || !player) {
|
||||
if (
|
||||
!this.state.mounted ||
|
||||
(!player && this.state.settings.settings.showPlayerStats)
|
||||
) {
|
||||
return (
|
||||
<main className="flex items-center !bg-transparent p-3">
|
||||
<Spinner />
|
||||
@ -109,7 +112,7 @@ export default class Overlay extends Component<OverlayProps, OverlayState> {
|
||||
return (
|
||||
<main>
|
||||
<div>
|
||||
{this.state.settings.settings.showPlayerStats && (
|
||||
{this.state.settings.settings.showPlayerStats && player && (
|
||||
<PlayerStats player={player} />
|
||||
)}
|
||||
{this.state.settings.settings.showScoreStats && <ScoreStats />}
|
||||
|
Loading…
x
Reference in New Issue
Block a user