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() {
|
render() {
|
||||||
const { player } = this.state;
|
const { player } = this.state;
|
||||||
|
|
||||||
if (!this.state.mounted || !player) {
|
if (
|
||||||
|
!this.state.mounted ||
|
||||||
|
(!player && this.state.settings.settings.showPlayerStats)
|
||||||
|
) {
|
||||||
return (
|
return (
|
||||||
<main className="flex items-center !bg-transparent p-3">
|
<main className="flex items-center !bg-transparent p-3">
|
||||||
<Spinner />
|
<Spinner />
|
||||||
@ -109,7 +112,7 @@ export default class Overlay extends Component<OverlayProps, OverlayState> {
|
|||||||
return (
|
return (
|
||||||
<main>
|
<main>
|
||||||
<div>
|
<div>
|
||||||
{this.state.settings.settings.showPlayerStats && (
|
{this.state.settings.settings.showPlayerStats && player && (
|
||||||
<PlayerStats player={player} />
|
<PlayerStats player={player} />
|
||||||
)}
|
)}
|
||||||
{this.state.settings.settings.showScoreStats && <ScoreStats />}
|
{this.state.settings.settings.showScoreStats && <ScoreStats />}
|
||||||
|
Loading…
Reference in New Issue
Block a user