UX: add unlink button, simplify unlink code

This commit is contained in:
Pieter Vander Vennet 2025-06-07 02:52:06 +02:00
parent 45c0f1a8d6
commit 1192434b45
13 changed files with 117 additions and 69 deletions

View file

@ -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> {