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

@ -54,7 +54,9 @@ module.exports = class Glyph {
}
// Inclusion
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;
if (component.tag) this.defaultTag = component.tag;
component.call(this, copyAnchors, copyWidth);