From 0a66bc119649136ec492950c20c80ae064c91133 Mon Sep 17 00:00:00 2001 From: Maksim Sukharev Date: Tue, 15 Oct 2024 19:15:12 +0200 Subject: [PATCH] fix(Viewer): expose Viewer.mimetypes as unified array of supported mimes Signed-off-by: Maksim Sukharev --- src/talk/renderer/Viewer/Viewer.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/talk/renderer/Viewer/Viewer.js b/src/talk/renderer/Viewer/Viewer.js index 61d70153..51356a7e 100644 --- a/src/talk/renderer/Viewer/Viewer.js +++ b/src/talk/renderer/Viewer/Viewer.js @@ -85,6 +85,10 @@ export async function createViewer() { component: ViewerHandlerText, }], + get mimetypes() { + return this.availableHandlers.flatMap(handler => handler.mimes) + }, + open(...args) { Viewer.instance.open(...args) },