forked from MapComplete/MapComplete
Formatting, comments, use injected download functionality
This commit is contained in:
parent
7b774b2aa3
commit
dc5c3461f8
7 changed files with 47 additions and 98 deletions
|
@ -374,9 +374,15 @@ export class Changes {
|
|||
for (const change of changes) {
|
||||
const id = change.type + "/" + change.id
|
||||
if (!objects.has(id)) {
|
||||
// The object hasn't been seen before, so it doesn't exist yet and is newly created by its very definition
|
||||
if (change.id >= 0) {
|
||||
// Might be a failed fetch for simply this object
|
||||
throw "Did not get an object that should be known: " + id
|
||||
}
|
||||
if(change.changes === undefined){
|
||||
// This object is a change to a newly created object. However, we have not seen the creation changedescription yet!
|
||||
throw "Not a creation of the object"
|
||||
}
|
||||
// This is a new object that should be created
|
||||
states.set(id, "created")
|
||||
console.log("Creating object for changeDescription", change)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue