aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2024-07-09 19:06:48 +0200
committerFerdinand Thiessen <opensource@fthiessen.de>2024-07-09 20:34:08 +0200
commitfd21e15f7dc35da0dd987958920a853e9de90b44 (patch)
tree7671c73ea372569af6f3eb65efe06c23753b93ec /apps
parentddb9ef8287f7ab9be9a017f749a3684eb85d7e51 (diff)
downloadnextcloud-server-fd21e15f7dc35da0dd987958920a853e9de90b44.tar.gz
nextcloud-server-fd21e15f7dc35da0dd987958920a853e9de90b44.zip
fix(files_sharing): Only enable mixed sharing types if there is at least one sharing type
If the array is empty it means it is not shared. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'apps')
-rw-r--r--apps/files_sharing/src/actions/sharingStatusAction.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/files_sharing/src/actions/sharingStatusAction.ts b/apps/files_sharing/src/actions/sharingStatusAction.ts
index 55e2bf21e8f..5efe65d99d6 100644
--- a/apps/files_sharing/src/actions/sharingStatusAction.ts
+++ b/apps/files_sharing/src/actions/sharingStatusAction.ts
@@ -106,7 +106,8 @@ export const action = new FileAction({
const node = nodes[0]
const ownerId = node?.attributes?.['owner-id']
- const isMixed = Array.isArray(node.attributes?.['share-types'])
+ const shareTypes = node.attributes?.['share-types']
+ const isMixed = Array.isArray(shareTypes) && shareTypes.length > 0
// If the node is shared multiple times with
// different share types to the current user