Skip to content

Commit

Permalink
Register only the export formats that the backend supports
Browse files Browse the repository at this point in the history
  • Loading branch information
simoncozens committed Jan 6, 2025
1 parent 3632bae commit 9008780
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/fontra/views/editor/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 })
);
}
}

Expand Down

0 comments on commit 9008780

Please sign in to comment.