Correct caching of image searcher

This commit is contained in:
pietervdvn 2021-03-26 03:36:49 +01:00
parent ac9cca4c51
commit 4694cc8e0f

View file

@ -99,7 +99,7 @@ export class ImageSearcher extends UIEventSource<{ key: string, url: string }[]>
} }
public static construct(tags: UIEventSource<any>, imagePrefix = "image", loadSpecial = true): ImageSearcher { public static construct(tags: UIEventSource<any>, imagePrefix = "image", loadSpecial = true): ImageSearcher {
const key = tags["id"] + " " + imagePrefix + loadSpecial; const key = tags.data["id"] + " " + imagePrefix + loadSpecial;
if (ImageSearcher._cache.has(key)) { if (ImageSearcher._cache.has(key)) {
return ImageSearcher._cache.get(key) return ImageSearcher._cache.get(key)
} }