diff options
author | Julius Härtl <jus@bitgrid.net> | 2020-01-27 13:14:24 +0300 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2020-01-27 13:14:24 +0300 |
commit | 3a6737df93bdf56f69500b83360a3a3e5f9dc161 (patch) | |
tree | 091675c62f1a34968ced8bae88f93fe5ce4f8341 /src | |
parent | f2e1a8b3e16242420f1216c4201c590da8298707 (diff) |
Check for unset wopi_src
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'src')
-rw-r--r-- | src/components/AdminSettings.vue | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/components/AdminSettings.vue b/src/components/AdminSettings.vue index 8f575b81..b04f504e 100644 --- a/src/components/AdminSettings.vue +++ b/src/components/AdminSettings.vue @@ -26,7 +26,7 @@ <h2>Collabora Online</h2> <p>{{ t('richdocuments', 'Collabora Online is a powerful LibreOffice-based online office suite with collaborative editing, which supports all major documents, spreadsheet and presentation file formats and works together with all modern browsers.') }}</p> - <div v-if="settings.wopi_url !== ''"> + <div v-if="settings.wopi_url && settings.wopi_url !== ''"> <div v-if="serverError == 2" id="security-warning-state-failure"> <span class="icon icon-close-white" /><span class="message">{{ t('richdocuments', 'Could not establish connection to the Collabora Online server.') }}</span> </div> @@ -374,8 +374,8 @@ export default { } }, checkIfDemoServerIsActive() { - this.settings.demoUrl = this.demoServers.find((server) => server.demo_url === this.settings.wopi_url) - if (this.settings.wopi_url !== '') { + this.settings.demoUrl = this.demoServers ? this.demoServers.find((server) => server.demo_url === this.settings.wopi_url) : null + if (this.settings.wopi_url && this.settings.wopi_url !== '') { this.serverMode = 'custom' } if (this.settings.demoUrl) { |