Bugfixing a refaktoring

This commit is contained in:
Michal Kváček
2023-10-13 23:25:06 +02:00
parent bf8df8bb34
commit 5b47c56c6f
10 changed files with 151 additions and 116 deletions
+1
View File
@@ -26,6 +26,7 @@ export const useEventsStore = defineStore('Events', {
this.isMutationRunning = true;
return apolloWrapper.mutate(CREATE_EVENT, {input: formData}).then(({data}) => {
const event = data.createEvent;
event.flights = event.flights || [];
this.items.push(event);
return event;
}).finally(() => this.isMutationRunning = false);