From 41c3c7db94eaca2bd0665e5431533c306e22642d Mon Sep 17 00:00:00 2001 From: Dan Date: Sat, 16 Dec 2023 18:40:39 +0000 Subject: [PATCH] Fix regressions --- src/services/Viewer.js | 2 +- src/views/Viewer.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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()