FIX: Show preview of Arial/System font in wizard (#22486)

Followup to db80a8ce79

The previous commit broke previewing the Arial and System fonts (which do
not have variant URLs to load).
This commit is contained in:
Martin Brennan 2023-07-07 15:28:40 +10:00 committed by GitHub
parent 3ea8203719
commit ba53df5254
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -87,6 +87,10 @@ export default Component.extend({
const fontVariantData = this.fontMap[font.id]; const fontVariantData = this.fontMap[font.id];
// System font for example does not need to load from a remote source. // System font for example does not need to load from a remote source.
if (!fontVariantData) {
this.loadedFonts.add(font.id);
}
if (fontVariantData && !this.loadedFonts.has(font.id)) { if (fontVariantData && !this.loadedFonts.has(font.id)) {
this.loadingFontVariants = true; this.loadingFontVariants = true;
const fontFaces = fontVariantData.map((fontVariant) => { const fontFaces = fontVariantData.map((fontVariant) => {