diff options
author | Julius Härtl <jus@bitgrid.net> | 2019-02-26 23:49:51 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-26 23:49:51 +0300 |
commit | 4214e66e7161a2d157a49fef7ced523f519182df (patch) | |
tree | e42bd0b088d92c40cf13e59a89036149f7685358 /js | |
parent | 9e9b5f91cfd17c8a6e34db3e142de5d295be55e6 (diff) | |
parent | 28e04624b3112b51e386f011f69dcb6da6066634 (diff) |
Merge pull request #412 from nextcloud/bugfix/408/public
Properly check if fileList is available
Diffstat (limited to 'js')
-rw-r--r-- | js/documents.js | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/js/documents.js b/js/documents.js index 0778d523..138604f7 100644 --- a/js/documents.js +++ b/js/documents.js @@ -168,6 +168,16 @@ var documentsMain = { return ocurl; }, + getFileList: function() { + if (parent.OCA.Files.App) { + return parent.OCA.Files.App.FileList; + } + if (parent.OCA.Files.FileList) { + return parent.OCA.Files.FileList; + } + return null; + }, + UI : { /* Editor wrapper HTML */ container : '<div id="mainContainer" class="claro">' + @@ -612,8 +622,8 @@ var documentsMain = { } } else if (msg.Values.Status === "Document_Loaded" ) { window.removeEventListener('message', editorInitListener, false); - if (parent.OCA.Files.App.fileList.reload) { - parent.OCA.Files.App.fileList.reload(); + if (documentsMain.getFileList()) { + documentsMain.getFileList().reload(); documentsMain.getFileModel(); } } @@ -838,8 +848,8 @@ var documentsMain = { } documentsMain.ready = true; - if (parent && parent.OCA.Files.App.fileList.reload) { - parent.OCA.Files.App.fileList.reload(); + if (parent && documentsMain.getFileList() !== null) { + documentsMain.getFileList().reload(); } }, |