From 8aaaffbb3dc29cd30393589dee657f04149da781 Mon Sep 17 00:00:00 2001 From: Fen Dweller Date: Thu, 12 Mar 2020 09:13:26 -0400 Subject: [PATCH] Give size-less entities a default 'Normal' size --- macrovision.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/macrovision.js b/macrovision.js index 745ea5c5..87a699d2 100644 --- a/macrovision.js +++ b/macrovision.js @@ -279,6 +279,15 @@ function makeEntity(info, views, sizes) { if (this.size === undefined && this.sizes.length > 0) { this.views[this.defaultView].height = this.sizes[0].height; this.size = this.sizes[0]; + console.warn("No default size set for " + info.name); + } else if (this.sizes.length == 0) { + this.sizes = [ + { + name: "Normal", + height: this.views[this.defaultView].height + } + ]; + this.size = this.sizes[0]; } this.desc = {};