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:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user