forked from MapComplete/MapComplete
Fix typing error in wikidata textfield
This commit is contained in:
parent
523c6aa6ef
commit
065ad1d5fd
1 changed files with 7 additions and 2 deletions
|
@ -364,8 +364,12 @@ Another example is to search for species and trees:
|
||||||
|
|
||||||
Locale.language
|
Locale.language
|
||||||
.map((lg) => {
|
.map((lg) => {
|
||||||
const prefixesUnrwapped: string[] = prefixes[lg] ?? prefixes
|
const prefixesUnrwapped: string[] = Array.isArray(prefixes)
|
||||||
const postfixesUnwrapped: string[] = postfixes[lg] ?? postfixes
|
? prefixes
|
||||||
|
: prefixes[lg] ?? []
|
||||||
|
const postfixesUnwrapped: string[] = Array.isArray(postfixes)
|
||||||
|
? postfixes
|
||||||
|
: postfixes[lg] ?? []
|
||||||
let clipped = searchFor
|
let clipped = searchFor
|
||||||
|
|
||||||
for (const postfix of postfixesUnwrapped) {
|
for (const postfix of postfixesUnwrapped) {
|
||||||
|
@ -375,6 +379,7 @@ Another example is to search for species and trees:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log("Prefixes are: ", prefixesUnrwapped)
|
||||||
for (const prefix of prefixesUnrwapped) {
|
for (const prefix of prefixesUnrwapped) {
|
||||||
if (searchFor.startsWith(prefix)) {
|
if (searchFor.startsWith(prefix)) {
|
||||||
clipped = searchFor.substring(prefix.length)
|
clipped = searchFor.substring(prefix.length)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue