Skip to content

Commit 88bad3d

Browse files
committed
Change if-then as requested in PR review
1 parent 8202d6f commit 88bad3d

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

ts/output/chtml/FontData.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -196,14 +196,14 @@ export class ChtmlFontData extends FontData<ChtmlCharOptions, ChtmlVariantData,
196196
prefix: string = ''
197197
): string[] {
198198
super.addExtension(data, prefix);
199-
if (data.fonts && this.options.adaptiveCSS) {
200-
const css = {};
201-
const styles = new CssStyles();
202-
(this.constructor as typeof ChtmlFontData).addDynamicFontCss(css, data.fonts, data.fontURL);
203-
styles.addStyles(css);
204-
return styles.getStyleRules();
199+
if (!data.fonts || !this.options.adaptiveCSS) {
200+
return [];
205201
}
206-
return [];
202+
const css = {};
203+
const styles = new CssStyles();
204+
(this.constructor as typeof ChtmlFontData).addDynamicFontCss(css, data.fonts, data.fontURL);
205+
styles.addStyles(css);
206+
return styles.getStyleRules();
207207
}
208208

209209
/***********************************************************************/

0 commit comments

Comments
 (0)