feat: Remove references of default editor

This commit is contained in:
Aman Harwara
2021-10-01 20:38:58 +05:30
parent b1d95808d1
commit f6c019b63c

View File

@@ -33,10 +33,6 @@ 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
@@ -44,10 +40,8 @@ class EditorMenuCtrl extends PureViewCtrl implements EditorMenuScope {
.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,
});
}