From a3ce4127efd11d0d114e3edf782edc8307c3564b Mon Sep 17 00:00:00 2001 From: abe33 Date: Thu, 20 Aug 2015 13:26:29 +0200 Subject: [PATCH] :bug: Prevent setting size of an undefined model Fixes #373 --- lib/minimap-element.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/minimap-element.coffee b/lib/minimap-element.coffee index a4794eca..1412a22a 100644 --- a/lib/minimap-element.coffee +++ b/lib/minimap-element.coffee @@ -302,6 +302,7 @@ class MinimapElement extends HTMLElement @requestUpdate() @setAttribute('stand-alone', true) if @minimap.isStandAlone() + @minimap.setScreenHeightAndWidth(@height, @width) if @width? and @height? @minimap @@ -416,7 +417,7 @@ class MinimapElement extends HTMLElement @width = @clientWidth canvasWidth = @width - @minimap.setScreenHeightAndWidth(@height, @width) + @minimap.setScreenHeightAndWidth(@height, @width) if @minimap? @requestForcedUpdate() if wasResized or visibilityChanged or forceUpdate