Fix the assert in FontLoader.prototype.loadSystemFont
Currently this `assert` isn't actually doing what it's supposed to, since the `FontLoader`-class doesn't have a `disableFontFace`-field. The `FontFaceObject`-class on the other hand has such a field, hence we update the method-signature to be able to check the intended thing.
This commit is contained in:
parent
c4784832ac
commit
2966171a2b
@ -80,12 +80,16 @@ class FontLoader {
|
||||
}
|
||||
}
|
||||
|
||||
async loadSystemFont({ systemFontInfo: info, _inspectFont }) {
|
||||
async loadSystemFont({
|
||||
systemFontInfo: info,
|
||||
disableFontFace,
|
||||
_inspectFont,
|
||||
}) {
|
||||
if (!info || this.#systemFonts.has(info.loadedName)) {
|
||||
return;
|
||||
}
|
||||
assert(
|
||||
!this.disableFontFace,
|
||||
!disableFontFace,
|
||||
"loadSystemFont shouldn't be called when `disableFontFace` is set."
|
||||
);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user