Skip to content

Commit

Permalink
Skip not loaded capabilities for FileLink
Browse files Browse the repository at this point in the history
Fixes public link page access when no session ever existed or
with incognito mode.
  • Loading branch information
Vincent Petry committed Oct 1, 2019
1 parent d70d52d commit c3a9edd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion apps/files/src/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ const appInfo = {
app: 'file-link',
component: FileLink,
enabled (capabilities) {
return capabilities.files_sharing.public.enabled === '1'
if (capabilities.files_sharing) {
return capabilities.files_sharing.public.enabled === '1'
}
return false
}
}, {
app: 'files-sharing',
Expand Down

0 comments on commit c3a9edd

Please sign in to comment.