forked from MapComplete/MapComplete
UX: add unlink button, simplify unlink code
This commit is contained in:
parent
45c0f1a8d6
commit
1192434b45
13 changed files with 117 additions and 69 deletions
|
@ -61,7 +61,11 @@ export class WikidataImageProvider extends ImageProvider {
|
|||
allImages.push(promises)
|
||||
}
|
||||
const resolved = await Promise.all(Utils.NoNull(allImages))
|
||||
return [].concat(...resolved)
|
||||
const flattened = resolved.flatMap( x => x)
|
||||
if(flattened.length === 1){
|
||||
flattened[0].originalAttribute = {key, value}
|
||||
}
|
||||
return flattened
|
||||
}
|
||||
|
||||
public DownloadAttribution(): Promise<undefined> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue