Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix null coalescing operator and download/delete action
Signed-off-by: John Molakvoæ <[email protected]>
  • Loading branch information
skjnldsv committed Sep 20, 2022
commit 1804ec025f1cc1c450a277c60b9bf100e6e594aa
6 changes: 3 additions & 3 deletions src/views/Viewer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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}`
},

/**
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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()
Expand Down