Use new viewer syntax with destructuring object

With nextcloud/viewer#936 and Nextcloud 22 the old syntax will not be supported anymore.

Signed-off-by: Azul <azul@riseup.net>
This commit is contained in:
Azul
2021-06-05 14:44:28 +02:00
parent 9562102435
commit f29d5fe028

View File

@@ -227,7 +227,7 @@ export default {
},
showViewer(attachment) {
if (attachment.extendedData.fileid && window.OCA.Viewer.availableHandlers.map(handler => handler.mimes).flat().includes(attachment.extendedData.mimetype)) {
window.OCA.Viewer.open(attachment.extendedData.path)
window.OCA.Viewer.open({ path: attachment.extendedData.path })
return
}