diff options
author | Julius Härtl <jus@bitgrid.net> | 2019-10-07 17:15:20 +0300 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2019-10-07 17:15:20 +0300 |
commit | 9d2170e5a83467a672169f0f5793a4586ab43276 (patch) | |
tree | 93ffc624ddcb53518010875edff6dc03f4e25a0e /src | |
parent | 02982d59f79cf86fe850afa4f40506d431cfc04e (diff) |
Do not try to access file list on public pages
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'src')
-rw-r--r-- | src/view/FilesAppIntegration.js | 3 | ||||
-rw-r--r-- | src/viewer.js | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/view/FilesAppIntegration.js b/src/view/FilesAppIntegration.js index da5c0a8f..993a836f 100644 --- a/src/view/FilesAppIntegration.js +++ b/src/view/FilesAppIntegration.js @@ -119,6 +119,9 @@ export default { if (this.fileModel !== null) { return this.fileModel } + if (!this.getFileList()) { + return null + } this.getFileList()._updateDetailsView(this.fileName, false) this.fileModel = this.getFileList().getModelForFile(this.fileName) diff --git a/src/viewer.js b/src/viewer.js index 1fabe145..fed66ab5 100644 --- a/src/viewer.js +++ b/src/viewer.js @@ -62,7 +62,7 @@ const odfViewer = { return } odfViewer.open = true - let fileList = FileList + let fileList = null if (context) { fileList = context.fileList var fileDir = context.dir |