Merge pull request #19551 from Snuffleupagus/loadSystemFont-fix-assert
Fix the `assert` in `FontLoader.prototype.loadSystemFont`
This commit is contained in:
commit
fef706233d
@ -80,12 +80,16 @@ class FontLoader {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async loadSystemFont({ systemFontInfo: info, _inspectFont }) {
|
async loadSystemFont({
|
||||||
|
systemFontInfo: info,
|
||||||
|
disableFontFace,
|
||||||
|
_inspectFont,
|
||||||
|
}) {
|
||||||
if (!info || this.#systemFonts.has(info.loadedName)) {
|
if (!info || this.#systemFonts.has(info.loadedName)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
assert(
|
assert(
|
||||||
!this.disableFontFace,
|
!disableFontFace,
|
||||||
"loadSystemFont shouldn't be called when `disableFontFace` is set."
|
"loadSystemFont shouldn't be called when `disableFontFace` is set."
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user