Skip to content

Commit

Permalink
feat: Remove references of default editor
Browse files Browse the repository at this point in the history
  • Loading branch information
amanharwara committed Oct 1, 2021
1 parent b1d9580 commit f6c019b
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions app/assets/javascripts/directives/views/editorMenu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,15 @@ class EditorMenuCtrl extends PureViewCtrl implements EditorMenuScope {
return this.selectedEditorUuid === editor.uuid;
}

public isEditorDefault(editor: SNComponent) {
return this.state.defaultEditor?.uuid === editor.uuid;
}

$onInit() {
super.$onInit();
const editors = this.application
.componentManager!.componentsForArea(ComponentArea.Editor)
.sort((a, b) => {
return a.name.toLowerCase() < b.name.toLowerCase() ? -1 : 1;
});
const defaultEditor = editors.filter((e) => e.isDefaultEditor())[0];
this.setState({
editors: editors,
defaultEditor: defaultEditor,
});
}

Expand Down

0 comments on commit f6c019b

Please sign in to comment.