Skip to content
Snippets Groups Projects
Commit 92651da6 authored by Richard Henck's avatar Richard Henck
Browse files

[editor] Wait async command to finish before sending unit to Verona-API

parent f0b26f27
No related branches found
No related tags found
No related merge requests found
Pipeline #60939 passed
...@@ -90,9 +90,9 @@ export class UnitService { ...@@ -90,9 +90,9 @@ export class UnitService {
} }
} }
updateUnitDefinition(command?: UnitUpdateCommand): void { async updateUnitDefinition(command?: UnitUpdateCommand): Promise<void> {
if (command) { if (command) {
const deletedData = command.command(); const deletedData = await command.command();
if (deletedData instanceof Promise) { if (deletedData instanceof Promise) {
deletedData.then((deletedData) => { deletedData.then((deletedData) => {
this.historyService.addCommand(command, deletedData); this.historyService.addCommand(command, deletedData);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment