refactor: Use removeEditorDefault

This commit is contained in:
Aman Harwara
2021-10-04 19:12:37 +05:30
parent 170234ce84
commit 980ab9358d

View File

@@ -62,10 +62,7 @@ const makeEditorDefault = (
currentDefault: SNComponent
) => {
if (currentDefault) {
application.changeItem(currentDefault.uuid, (m) => {
const mutator = m as ComponentMutator;
mutator.defaultEditor = false;
});
removeEditorDefault(application, currentDefault);
}
application.changeAndSaveItem(component.uuid, (m) => {
const mutator = m as ComponentMutator;