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:
parent
38c76847e9
commit
7910779143
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue