Skip to content

Commit

Permalink
Filter sidebar shares for displayName (#9504)
Browse files Browse the repository at this point in the history
* Fix #9257

* Move filtering for collaborator displayName in outgoingShares to useShares composable
  • Loading branch information
pascalwengerter authored Aug 16, 2023
1 parent 50c8945 commit a7543e4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions changelog/unreleased/bugfix-filter-shares-without-displayname
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Bugfix: Filter out shares without display name

In rare (legacy) cases, shares can exist without a displayName key, which caused trouble in the sharing sidebar section.
This has been addressed by filtering out shares without a displayName.

https://github.com/owncloud/web/issues/9257
https://github.com/owncloud/web/pull/9504
4 changes: 2 additions & 2 deletions packages/web-app-files/src/composables/shares/useShares.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { useStore } from 'web-pkg/src/composables'
export function useShares() {
const store = useStore()
const outgoingLinks: Ref<Share[]> = computed(() => store.getters['Files/outgoingLinks'])
const outgoingCollaborators: Ref<Share[]> = computed(
() => store.getters['Files/outgoingCollaborators']
const outgoingCollaborators: Ref<Share[]> = computed(() =>
store.getters['Files/outgoingCollaborators'].filter((s) => s.collaborator.displayName)
)
return { outgoingCollaborators, outgoingLinks }
}

0 comments on commit a7543e4

Please sign in to comment.