forked from MapComplete/MapComplete
Fix: probably partial fix of #2407
This commit is contained in:
parent
7b466a1d53
commit
68d96063ac
1 changed files with 12 additions and 1 deletions
|
@ -28,7 +28,18 @@
|
|||
if (featureId == "*") {
|
||||
return input.map((inp) => inp.length)
|
||||
}
|
||||
return input.map((success) => success.filter((item) => item === featureId).length)
|
||||
|
||||
return input.map((ids) => {
|
||||
// 'input' contains all the ids of the _features_ for which images are being uploaded
|
||||
// This id can be the temporary id (e.g. node/-1) or the new id
|
||||
// We thus have to check the remappings!
|
||||
const remappings = state.changes._changesetHandler._remappings
|
||||
const remappedFeatureId = remappings.get(featureId) ?? featureId
|
||||
return ids.filter((itemId) => itemId === featureId ||
|
||||
itemId === remappedFeatureId ||
|
||||
(remappings.get(itemId) ?? itemId === featureId) ||
|
||||
(remappings.get(itemId) ?? itemId === remappedFeatureId)).length
|
||||
})
|
||||
}
|
||||
|
||||
let successfull = getCount(state.imageUploadManager.successfull)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue