forked from MapComplete/MapComplete
Fix: fix #2278
This commit is contained in:
parent
afce4cb5ba
commit
540e2c227e
2 changed files with 11 additions and 3 deletions
|
@ -18,6 +18,10 @@ export class And extends TagsFilter {
|
||||||
console.error("Assertion failed: invalid subtags:", and)
|
console.error("Assertion failed: invalid subtags:", and)
|
||||||
throw "Assertion failed: invalid subtags found"
|
throw "Assertion failed: invalid subtags found"
|
||||||
}
|
}
|
||||||
|
if (and.some((p) => p === undefined)) {
|
||||||
|
console.error("Assertion failed: invalid subtags:", and)
|
||||||
|
throw "Assertion failed: invalid subtags found (undefined)"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static construct(and: ReadonlyArray<TagsFilter>): TagsFilter
|
public static construct(and: ReadonlyArray<TagsFilter>): TagsFilter
|
||||||
|
|
|
@ -61,9 +61,13 @@
|
||||||
const changedProperties = TagUtils.changeAsProperties(selectedTags.asChange(tags?.data ?? {}))
|
const changedProperties = TagUtils.changeAsProperties(selectedTags.asChange(tags?.data ?? {}))
|
||||||
const deleteReason = changedProperties[DeleteConfig.deleteReasonKey]
|
const deleteReason = changedProperties[DeleteConfig.deleteReasonKey]
|
||||||
if (deleteReason) {
|
if (deleteReason) {
|
||||||
const softDeletionTags= new And([deleteConfig.softDeletionTags,
|
|
||||||
...layer.tagRenderings.flatMap(tr => tr.onSoftDelete ?? [])
|
let softDeletionTags: UploadableTag
|
||||||
|
if(hasSoftDeletion){
|
||||||
|
softDeletionTags = new And([deleteConfig.softDeletionTags,
|
||||||
|
...layer.tagRenderings.flatMap(tr => tr.onSoftDelete ?? []),
|
||||||
])
|
])
|
||||||
|
}
|
||||||
|
|
||||||
// This is a proper, hard deletion
|
// This is a proper, hard deletion
|
||||||
actionToTake = new DeleteAction(
|
actionToTake = new DeleteAction(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue