Skip to content

Commit fdb268d

Browse files
authored
fix(game): dont crash for unauth'd users (RetroAchievements#2795)
1 parent 72371d7 commit fdb268d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

resources/views/pages-legacy/gameInfo.blade.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -491,9 +491,9 @@ function resize() {
491491
@endif
492492

493493
@if ($isFullyFeaturedGame)
494-
@if ($userModel->can('update', $gameModel))
494+
@if ($userModel && $userModel->can('update', $gameModel))
495495
<a class="btn mb-1" href="{{ route('filament.admin.resources.games.edit', ['record' => $gameModel->id]) }}">Manage</a>
496-
@elseif ($userModel->can('manage', $gameModel))
496+
@elseif ($userModel && $userModel->can('manage', $gameModel))
497497
<a class="btn mb-1" href="{{ route('filament.admin.resources.games.view', ['record' => $gameModel->id]) }}">Manage</a>
498498
@endif
499499
@endif

0 commit comments

Comments
 (0)