From 1804ec025f1cc1c450a277c60b9bf100e6e594aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Molakvo=C3=A6?= Date: Tue, 20 Sep 2022 16:45:39 +0200 Subject: [PATCH] Fix null coalescing operator and download/delete action MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ --- src/views/Viewer.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/views/Viewer.vue b/src/views/Viewer.vue index a030a812f..45d83c948 100644 --- a/src/views/Viewer.vue +++ b/src/views/Viewer.vue @@ -642,7 +642,7 @@ export default { }, updateTitle(fileName) { - document.title = `${fileName} - ${OCA.Theming?.name || oc_defaults.name}` + document.title = `${fileName} - ${OCA.Theming?.name ?? oc_defaults.name}` }, /** @@ -685,7 +685,7 @@ export default { } // force apply mixin - handler.component.mixins = [...handler.component.mixins || [], Mime] + handler.component.mixins = [...handler?.component?.mixins ?? [], Mime] // parsing mimes registration if (handler.mimes) { @@ -937,7 +937,7 @@ export default { async onDelete() { try { - const url = this.root + this.currentFile.filename + const url = this.source ?? this.root + this.currentFile.filename await axios.delete(url) if (this.hasPrevious) { this.previous()