Fix slab crash when building (#671).

This commit is contained in:
be5invis 2020-08-20 08:39:55 -07:00
parent 138e29def2
commit 295e87660a
2 changed files with 5 additions and 1 deletions

View file

@ -3780,8 +3780,10 @@ glyph-block Letter-Latin-Lower-N : begin
define [NTopLeftSerif] : begin define [NTopLeftSerif] : begin
tagged 'serifLT' : LeftwardTopSerif SB XH SideJut tagged 'serifLT' : LeftwardTopSerif SB XH SideJut
glyph-proc
define [NBottomLeftSerif] : if (!para.isItalic) define [NBottomLeftSerif] : if (!para.isItalic)
tagged 'serifLB' : CenterBottomSerif (SB + HalfStroke * HVContrast) 0 Jut tagged 'serifLB' : CenterBottomSerif (SB + HalfStroke * HVContrast) 0 Jut
glyph-proc
define [NBottomRightSerif] : if (para.isItalic) define [NBottomRightSerif] : if (para.isItalic)
tagged 'serifRB' : RightwardBottomSerif RightSB 0 SideJut tagged 'serifRB' : RightwardBottomSerif RightSB 0 SideJut
tagged 'serifRB' : CenterBottomSerif (RightSB - HalfStroke * HVContrast) 0 Jut tagged 'serifRB' : CenterBottomSerif (RightSB - HalfStroke * HVContrast) 0 Jut

View file

@ -54,7 +54,9 @@ module.exports = class Glyph {
} }
// Inclusion // Inclusion
include(component, copyAnchors, copyWidth) { include(component, copyAnchors, copyWidth) {
if (component instanceof Function) { if (!component) {
throw new Error("Unreachable: Attempt to include a Null or Undefined");
} else if (component instanceof Function) {
const t = this.defaultTag; const t = this.defaultTag;
if (component.tag) this.defaultTag = component.tag; if (component.tag) this.defaultTag = component.tag;
component.call(this, copyAnchors, copyWidth); component.call(this, copyAnchors, copyWidth);