forked from MapComplete/MapComplete
Merge develop
This commit is contained in:
commit
fec3608ca4
57 changed files with 1160 additions and 594 deletions
|
|
@ -60,7 +60,7 @@ export default class FilterConfig {
|
|||
}
|
||||
|
||||
const fields: { name: string; type: ValidatorType }[] = (option.fields ?? []).map((f, i) => {
|
||||
const type = <ValidatorType> f.type ?? "string"
|
||||
const type = <ValidatorType> f.type ?? "regex"
|
||||
if(Validators.availableTypes.indexOf(type) < 0){
|
||||
throw `Invalid filter: type is not a valid validator. Did you mean one of ${Utils.sortedByLevenshteinDistance(type, <any>Validators.availableTypes, x => x).slice(0, 3)}`
|
||||
}
|
||||
|
|
@ -70,12 +70,12 @@ export default class FilterConfig {
|
|||
}
|
||||
return {
|
||||
name: f.name,
|
||||
type,
|
||||
type
|
||||
}
|
||||
})
|
||||
|
||||
for (const field of fields) {
|
||||
for (let ln in question.translations) {
|
||||
for (const ln in question.translations) {
|
||||
const txt = question.translations[ln]
|
||||
if (ln.startsWith("_")) {
|
||||
continue
|
||||
|
|
@ -226,7 +226,7 @@ export default class FilterConfig {
|
|||
opt.osmTags?.asHumanString() ?? "",
|
||||
opt.fields?.length > 0
|
||||
? opt.fields.map((f) => f.name + " (" + f.type + ")").join(" ")
|
||||
: undefined,
|
||||
: undefined
|
||||
])
|
||||
)
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue