Attempt to fix empty changes

This commit is contained in:
Pieter Vander Vennet 2021-07-26 16:51:57 +02:00
parent 4f2881269a
commit 1be8e6e1d1
3 changed files with 7 additions and 5 deletions

View file

@ -263,8 +263,8 @@ export class Changes {
} = self.CreateChangesetObjects(pending, osmObjects)
if (changes.newObjects.length + changes.deletedObjects.length + changes.modifiedObjects.length === 0) {
console.log("No changes to be made")
this.pendingChanges.setData([])
this.isUploading.setData(false)
self.pendingChanges.setData([])
self.isUploading.setData(false)
return true; // Unregister the callback
}
@ -278,7 +278,10 @@ export class Changes {
self.pendingChanges.setData([]);
self.isUploading.setData(false)
},
() => self.isUploading.setData(false) // Failed - mark to try again
() => {
console.log("Upload failed - trying again later")
return self.isUploading.setData(false);
} // Failed - mark to try again
)
return true;

View file

@ -54,7 +54,6 @@ export class ChangesetHandler {
}
const newVersion = parseInt(node.attributes.new_id.value);
}
}

View file

@ -193,7 +193,7 @@ export default class ShowDataLayer {
leafletLayer.openPopup()
}
if(feature.id !== feature.properties.id){
console.log("Not opening the popup for", feature)
console.trace("Not opening the popup for", feature)
}
}