diff --git a/projects/editor/src/app/services/unit-services/unit.service.ts b/projects/editor/src/app/services/unit-services/unit.service.ts index 1524da362b9b546ef3f611b32dcb3c303d1d7f5c..f2baae27ec2f2d1bd53a57426032b4f42378dffb 100644 --- a/projects/editor/src/app/services/unit-services/unit.service.ts +++ b/projects/editor/src/app/services/unit-services/unit.service.ts @@ -90,9 +90,9 @@ export class UnitService { } } - updateUnitDefinition(command?: UnitUpdateCommand): void { + async updateUnitDefinition(command?: UnitUpdateCommand): Promise<void> { if (command) { - const deletedData = command.command(); + const deletedData = await command.command(); if (deletedData instanceof Promise) { deletedData.then((deletedData) => { this.historyService.addCommand(command, deletedData);