Skip to content

Commit

Permalink
Empty array if user->oauth is null (#754)
Browse files Browse the repository at this point in the history
  • Loading branch information
RMartinOscar authored Dec 3, 2024
1 parent bd51191 commit 141baeb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Filament/Resources/UserResource/Pages/EditProfile.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ protected function getForms(): array
continue;
}

$unlink = array_key_exists($name, $this->getUser()->oauth);
$unlink = array_key_exists($name, $this->getUser()->oauth ?? []);

$providers[] = Action::make("oauth_$name")
->label(($unlink ? 'Unlink ' : 'Link ') . Str::title($name))
Expand Down

0 comments on commit 141baeb

Please sign in to comment.