Skip to content

Commit

Permalink
Fixed Profile primaryRole bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Tignor authored and Thomas Tignor committed Jan 4, 2024
1 parent bdb42a8 commit c71c647
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tdrs-frontend/src/components/Profile/Profile.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
function Profile() {
const user = useSelector((state) => state.auth.user)
// Most higher-env users will only have a single role, so just grab the first one.
const primaryRole = user?.roles[0]
const primaryRole = user?.roles?.[0]
const missingAccessRequest = useSelector(accountIsMissingAccessRequest)
const isAccessRequestPending = useSelector(accountIsInReview)

Expand Down

0 comments on commit c71c647

Please sign in to comment.