forked from MapComplete/MapComplete
Fix: nobrand= is actually applied when using the Name suggestion index
This commit is contained in:
parent
89a20ca1af
commit
c3bb0cb837
1 changed files with 10 additions and 5 deletions
|
@ -1001,11 +1001,16 @@ export class TagRenderingConfigUtils {
|
||||||
// The original mappings get "priorityIf" set
|
// The original mappings get "priorityIf" set
|
||||||
const oldMappingsCloned =
|
const oldMappingsCloned =
|
||||||
clone.mappings?.map(
|
clone.mappings?.map(
|
||||||
(m) =>
|
(m) => {
|
||||||
<Mapping>{
|
const mapping = {
|
||||||
...m,
|
...m,
|
||||||
addExtraTags: [new Tag("nobrand", "")],
|
|
||||||
priorityIf: m.priorityIf ?? TagUtils.Tag("id~*"),
|
priorityIf: m.priorityIf ?? TagUtils.Tag("id~*"),
|
||||||
|
}
|
||||||
|
if (m.if.usedKeys().indexOf("nobrand") < 0) {
|
||||||
|
// Erase 'nobrand=yes', unless this option explicitly sets it
|
||||||
|
mapping["addExtraTags"] = [new Tag("nobrand", "")]
|
||||||
|
}
|
||||||
|
return <Mapping>mapping
|
||||||
},
|
},
|
||||||
) ?? []
|
) ?? []
|
||||||
clone.mappings = [...oldMappingsCloned, ...extraMappings]
|
clone.mappings = [...oldMappingsCloned, ...extraMappings]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue