Skip to content
This repository has been archived by the owner on Aug 3, 2024. It is now read-only.

Fix page crash on orgs #1727

Merged
merged 1 commit into from
Jun 14, 2024
Merged

Fix page crash on orgs #1727

merged 1 commit into from
Jun 14, 2024

Conversation

Geometrically
Copy link
Member

No description provided.

@Geometrically Geometrically merged commit 05d45d9 into master Jun 14, 2024
3 checks passed
@Geometrically Geometrically deleted the fix-page-crash-orgs branch June 14, 2024 22:43
@@ -1264,7 +1264,8 @@ const members = computed(() => {
)
: x.is_owner
)
const rest = acceptedMembers.filter((x) => x.user.id !== owner.user.id) || []

const rest = acceptedMembers.filter((x) => !owner || x.user.id !== owner.user.id) || []
Copy link
Contributor

@brawaru brawaru Jun 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would've been better to just skip filtering altogether if owner is falsey :p

Suggested change
const rest = acceptedMembers.filter((x) => !owner || x.user.id !== owner.user.id) || []
const rest = owner ? acceptedMembers.filter((x) => x.user.id !== owner.user.id) : acceptedMembers

Also that || [] seems redundant since filter never returns undefined.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants