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>
This commit is contained in:
Ferdinand Thiessen 2024-07-09 19:06:48 +02:00
parent ddb9ef8287
commit fd21e15f7d

View file

@ -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