Skip to content

Commit

Permalink
Fix: inaccessible filepicker
Browse files Browse the repository at this point in the history
Signed-off-by: Hamza Mahjoubi <hamzamahjoubi221@gmail.com>
  • Loading branch information
hamza221 committed Apr 18, 2024
1 parent 46d37f7 commit 0958ec3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/ComposerAttachments.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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
},
Expand Down

0 comments on commit 0958ec3

Please sign in to comment.