From 0958ec341a8f6fa712057f4d96314f03b0c12351 Mon Sep 17 00:00:00 2001 From: Hamza Mahjoubi Date: Thu, 18 Apr 2024 14:45:05 +0200 Subject: [PATCH] Fix: inaccessible filepicker Signed-off-by: Hamza Mahjoubi --- src/components/ComposerAttachments.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/ComposerAttachments.vue b/src/components/ComposerAttachments.vue index e6e0e62b68..9de01adf12 100644 --- a/src/components/ComposerAttachments.vue +++ b/src/components/ComposerAttachments.vue @@ -211,7 +211,7 @@ export default { }, methods: { filterAttachements(node) { - const downloadShareAttribute = JSON.parse(node.attributes['share-attributes']).find((shareAttribute) => shareAttribute.key === 'download') + const downloadShareAttribute = node.attributes['share-attributes'] ? JSON.parse(node.attributes['share-attributes'])?.find((shareAttribute) => shareAttribute.key === 'download') : undefined const downloadPermissions = downloadShareAttribute !== undefined ? downloadShareAttribute.enabled : true return (node.permissions & OC.PERMISSION_READ) && downloadPermissions },