Skip to content

Commit

Permalink
Fix role title
Browse files Browse the repository at this point in the history
  • Loading branch information
asika32764 committed Dec 16, 2023
1 parent 2852471 commit af48353
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Module/Admin/User/Form/EditForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ function (Form $form) {
function (ListField $field, mixed $text, mixed $value) use ($iAmSuperUser) {
if ($text instanceof EnumTranslatableInterface || is_numeric($value)) {
$value = value($text);
$text = $this->accessService->wrapUserRole($value)->getTitle();
$text = $this->accessService->wrapUserRole($value)?->getTitle() ?? $value;
}

if (!$iAmSuperUser && $this->accessService->isSuperUserRole($value)) {
Expand Down

0 comments on commit af48353

Please sign in to comment.