diff --git a/src/services/Viewer.js b/src/services/Viewer.js index c1035a391..db9b7e3ae 100644 --- a/src/services/Viewer.js +++ b/src/services/Viewer.js @@ -101,7 +101,7 @@ export default class Viewer { registerHandler(handler) { this._state.handlers.push(handler) const handledMimes = [ - ...handler.mimes, + ...handler.mimes || [], ...Object.keys(handler.mimesAliases || {}), ] this._mimetypes.push.apply(this._mimetypes, handledMimes) diff --git a/src/views/Viewer.vue b/src/views/Viewer.vue index f2af3f467..cd5385da8 100644 --- a/src/views/Viewer.vue +++ b/src/views/Viewer.vue @@ -710,7 +710,7 @@ export default { fileInfo = this.fileList[this.currentIndex] // show file - this.currentFile = new File(fileInfo, mime, handler.component) + this.currentFile = new File(fileInfo, mime, this.components[mime]) this.comparisonFile = null this.updatePreviousNext()