forked from MapComplete/MapComplete
Add wikidata-images to etymology theme, various fixes for custom image carousels and gracious handling of wikidata/wikimedia
This commit is contained in:
parent
54abe7d057
commit
ff11f96e91
10 changed files with 155 additions and 99 deletions
|
@ -20,7 +20,14 @@ export default class GenericImageProvider extends ImageProvider {
|
|||
if (this._valuePrefixBlacklist.some(prefix => value.startsWith(prefix))) {
|
||||
return []
|
||||
}
|
||||
|
||||
|
||||
try{
|
||||
new URL(value)
|
||||
}catch (_){
|
||||
// Not a valid URL
|
||||
return []
|
||||
}
|
||||
|
||||
return [Promise.resolve({
|
||||
key: key,
|
||||
url: value,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue