From ed142ae43136b44ef59809889ac858849b193f3f Mon Sep 17 00:00:00 2001 From: Just van Rossum Date: Tue, 19 Nov 2024 22:42:59 +0100 Subject: [PATCH] Fix comments --- src/fontra/client/core/font-controller.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/fontra/client/core/font-controller.js b/src/fontra/client/core/font-controller.js index ddabd4e87..497ef52f1 100644 --- a/src/fontra/client/core/font-controller.js +++ b/src/fontra/client/core/font-controller.js @@ -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); } @@ -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);