Skip to content

Commit

Permalink
Fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
justvanrossum committed Nov 19, 2024
1 parent de78668 commit ed142ae
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/fontra/client/core/font-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,13 @@ export class FontController {
}

getBackgroundImage(imageIdentifier) {
// This returns a promise for the requested background image
const cacheEntry = this._getBackgroundImageCacheEntry(imageIdentifier);
return cacheEntry.imagePromise;
}

getBackgroundImageColorized(imageIdentifier, color) {
// This returns a promise for the requested colorized background image
if (!color) {
return this.getBackgroundImage(imageIdentifier);
}
Expand All @@ -162,7 +164,6 @@ export class FontController {
}

_getBackgroundImageCacheEntry(imageIdentifier) {
// This returns a promise for the requested background image
let cacheEntry = this._backgroundImageCache.get(imageIdentifier);
if (!cacheEntry) {
cacheEntry = this._cacheBackgroundImageFromIdentifier(imageIdentifier);
Expand Down

0 comments on commit ed142ae

Please sign in to comment.