view_hand being sent and panicking causes logged_out or something else to fail?
This commit is contained in:
parent
baab16144b
commit
c68af245af
3 changed files with 6 additions and 4 deletions
|
|
@ -139,8 +139,9 @@ pub struct HandView {
|
|||
|
||||
#[view(accessor = view_closed_hands, public)]
|
||||
fn view_closed_hands(ctx: &ViewContext) -> Vec<HandView> {
|
||||
let this_player = ctx.db.player().identity().find(ctx.sender()).unwrap();
|
||||
if let Some(lobby) = ctx.db.lobby().id().find(this_player.lobby_id) {
|
||||
if let Some(this_player) = ctx.db.player().identity().find(ctx.sender())
|
||||
&& let Some(lobby) = ctx.db.lobby().id().find(this_player.lobby_id)
|
||||
{
|
||||
lobby
|
||||
.players
|
||||
.iter()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue