forked from MapComplete/MapComplete
Add support for 'contact:email','contact:phone' and 'contact:website' (write to 'email', 'phone' and 'website' if changed) - fix #601; remove 'tel:' from phone addresses - fix #602; small fixes to tag preview in case of deletion
This commit is contained in:
parent
a35b1d34f4
commit
4fd30d1a62
4 changed files with 39 additions and 7 deletions
|
@ -59,7 +59,7 @@ export class And extends TagsFilter {
|
|||
}
|
||||
|
||||
asHumanString(linkToWiki: boolean, shorten: boolean, properties) {
|
||||
return this.and.map(t => t.asHumanString(linkToWiki, shorten, properties)).join("&");
|
||||
return this.and.map(t => t.asHumanString(linkToWiki, shorten, properties)).filter(x => x !== "").join("&");
|
||||
}
|
||||
|
||||
isUsableAsAnswer(): boolean {
|
||||
|
|
|
@ -48,7 +48,7 @@ export class Tag extends TagsFilter {
|
|||
}
|
||||
if(v === "" || v === undefined){
|
||||
// This tag will be removed if in the properties, so we indicate this with special rendering
|
||||
if(currentProperties !== undefined && (currentProperties[this.key] ?? "") !== ""){
|
||||
if(currentProperties !== undefined && (currentProperties[this.key] ?? "") === ""){
|
||||
// This tag is not present in the current properties, so this tag doesn't change anything
|
||||
return ""
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue