refactor: Use removeEditorDefault
This commit is contained in:
@@ -62,10 +62,7 @@ const makeEditorDefault = (
|
|||||||
currentDefault: SNComponent
|
currentDefault: SNComponent
|
||||||
) => {
|
) => {
|
||||||
if (currentDefault) {
|
if (currentDefault) {
|
||||||
application.changeItem(currentDefault.uuid, (m) => {
|
removeEditorDefault(application, currentDefault);
|
||||||
const mutator = m as ComponentMutator;
|
|
||||||
mutator.defaultEditor = false;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
application.changeAndSaveItem(component.uuid, (m) => {
|
application.changeAndSaveItem(component.uuid, (m) => {
|
||||||
const mutator = m as ComponentMutator;
|
const mutator = m as ComponentMutator;
|
||||||
|
|||||||
Reference in New Issue
Block a user