From 900878065f889263f52c43775265c965263a6cd7 Mon Sep 17 00:00:00 2001 From: Simon Cozens Date: Fri, 20 Dec 2024 14:57:42 +0000 Subject: [PATCH] Register only the export formats that the backend supports --- src/fontra/views/editor/editor.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/fontra/views/editor/editor.js b/src/fontra/views/editor/editor.js index 8a5b342ad..38d448bc1 100644 --- a/src/fontra/views/editor/editor.js +++ b/src/fontra/views/editor/editor.js @@ -693,16 +693,16 @@ export class EditorController extends ViewController { } initActionsAfterStart() { - if (this.fontController.backendInfo.projectManagerFeatures["export-as"]) { - for (const format of EXPORT_FORMATS) { - registerAction( - `action.export-as.${format}`, - { - topic: "0035-action-topics.export-as", - }, - (event) => this.fontController.exportAs({ format }) - ); - } + for (const format of this.fontController.backendInfo.projectManagerFeatures[ + "export-as" + ] || []) { + registerAction( + `action.export-as.${format}`, + { + topic: "0035-action-topics.export-as", + }, + (event) => this.fontController.exportAs({ format }) + ); } }