From fd21e15f7dc35da0dd987958920a853e9de90b44 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Tue, 9 Jul 2024 19:06:48 +0200 Subject: [PATCH] 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 --- apps/files_sharing/src/actions/sharingStatusAction.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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