Skip to content

Commit fba4ff0

Browse files
committed
Fix #940: GoMap suggests deprecated/discouraged crossing= values without any information about their status
1 parent 9dd3189 commit fba4ff0

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

src/Shared/PresetsDatabase/TagInfo.swift

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,18 @@ class TagInfo {
7979
}
8080
} else {
8181
for v in results {
82-
let inWiki = ((v["in_wiki"] as? NSNumber) ?? 0) == 1
83-
if !inWiki, ((v["fraction"] as? NSNumber)?.doubleValue ?? 0.0) < 0.01 {
82+
guard
83+
let fraction = (v["fraction"] as? NSNumber)?.doubleValue,
84+
fraction >= 0.001
85+
else {
8486
continue // it's a very uncommon value, so ignore it
8587
}
86-
if let val = v["value"] as? String {
87-
resultList.append(val)
88+
guard
89+
let val = v["value"] as? String
90+
else {
91+
continue
8892
}
93+
resultList.append(val)
8994
}
9095
}
9196
if resultList.count > 0 {

0 commit comments

Comments
 (0)