Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/richdocuments.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2020-07-08 15:13:45 +0300
committerJulius Härtl <jus@bitgrid.net>2020-10-13 15:35:55 +0300
commitdd224654e8039df9f2b9b02ee5dccb68cda8d443 (patch)
tree04e7b4fb2dffd4d1652fff586876f932188a8744 /src
parentc56e362a7c338e6b56d9d25b7bcdaac01220a56b (diff)
Properly handle cases where the fileList could not be fetched
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'src')
-rw-r--r--src/view/FilesAppIntegration.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/view/FilesAppIntegration.js b/src/view/FilesAppIntegration.js
index 53a53497..5fd1d6ff 100644
--- a/src/view/FilesAppIntegration.js
+++ b/src/view/FilesAppIntegration.js
@@ -62,8 +62,8 @@ export default {
if (typeof this.getFileList() !== 'undefined') {
this.getFileModel()
- this.getFileList().hideMask()
- this.getFileList().setPageTitle(this.fileName)
+ this.getFileList().hideMask && this.getFileList().hideMask()
+ this.getFileList().setPageTitle && this.getFileList().setPageTitle(this.fileName)
}
const headerRight = document.querySelector('#header .header-right')
@@ -224,6 +224,10 @@ export default {
},
_addHeaderFileActions() {
+ if (!this.getFileList().$el) {
+ console.error('[FilesAppIntegration] Failed to register file actions due to missing $el dependency')
+ return
+ }
console.debug('[FilesAppIntegration] Adding header file actions')
OC.unregisterMenu($('#richdocuments-actions .icon-more'), $('#richdocuments-actions-menu'))
$('#richdocuments-actions').remove()