0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-10 23:36:14 -05:00

Removed "has" method usage to be cache-compatible

refs https://github.com/TryGhost/Toolbox/issues/364

- Cache adapter does not have a "has" method, so using "get" instead to achieve the same to have full compatibility. Should allow to just drop in the cache adapter implementation instead of current Map instance.
This commit is contained in:
Naz 2022-08-05 14:53:10 +01:00
parent 38c76847e9
commit 7910779143

View file

@ -28,7 +28,7 @@ class CachedImageSizeFromUrl {
}
// image size is not in cache
if (!this.cache.has(url)) {
if (!this.cache.get(url)) {
return this.imageSize.getImageSizeFromUrl(url).then((res) => {
this.cache.set(url, res);