Skip to content

Commit

Permalink
Fixed empty server list for guest
Browse files Browse the repository at this point in the history
  • Loading branch information
dsbilling committed Aug 8, 2023
1 parent af5dcbb commit 7dd25f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Http/Livewire/Server/ServerCardList.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@ private function loadData(): void
->orderBy('last_online_at', 'desc')
->orderBy('ping', 'asc')
->get();
$this->my_servers = $this->user->id ? Server::where('user_id', $this->user->id)->get() : [];
$this->my_servers = isset($this->user) ? Server::where('user_id', $this->user->id)->get() : collect();
}
}

0 comments on commit 7dd25f2

Please sign in to comment.