chore: listen for later _trySave status

This commit is contained in:
Yohan Boniface 2024-10-30 09:42:06 +01:00
parent ed232e59b8
commit 7f65b1de57

View file

@ -1066,12 +1066,14 @@ export class DataLayer extends ServerStored {
),
async () => {
// Save again this layer
await this._trySave(url, {}, formData)
this.isDirty = false
const status = await this._trySave(url, {}, formData)
if (status) {
this.isDirty = false
// Call the main save, in case something else needs to be saved
// as the conflict stopped the saving flow
await this.map.saveAll()
// Call the main save, in case something else needs to be saved
// as the conflict stopped the saving flow
await this.map.saveAll()
}
}
)
}