|
|
@@ -62,7 +62,11 @@ this.hooksFrame = this.hooksFrame || (() => {
|
|
|
detail.src = argumentsList[1];
|
|
|
const descriptors = argumentsList[2];
|
|
|
if (descriptors) {
|
|
|
- Object.keys(descriptors).forEach(descriptor => detail[FONT_STYLE_PROPERTIES[descriptor]] = descriptors[descriptor]);
|
|
|
+ Object.keys(descriptors).forEach(descriptor => {
|
|
|
+ if (FONT_STYLE_PROPERTIES[descriptor]) {
|
|
|
+ detail[FONT_STYLE_PROPERTIES[descriptor]] = descriptors[descriptor]
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
dispatchEvent(new CustomEvent(NEW_FONT_FACE_EVENT, { detail }));
|
|
|
return new FontFace(...argumentsList);
|