From fabed80b5f2d5cb50e0e524fa519b37d5367b542 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Sat, 14 Sep 2013 17:56:18 +0200 Subject: [PATCH] Prevent trying to set the 'maxHeight' property of the secondaryToolbar before the viewer is completely loaded --- web/secondary_toolbar.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/web/secondary_toolbar.js b/web/secondary_toolbar.js index 04ad4e84f..6c31a4e17 100644 --- a/web/secondary_toolbar.js +++ b/web/secondary_toolbar.js @@ -96,6 +96,9 @@ var SecondaryToolbar = { // Misc. functions for interacting with the toolbar. setMaxHeight: function secondaryToolbarSetMaxHeight(container) { + if (!container) { + return; + } this.newContainerHeight = container.clientHeight; if (this.previousContainerHeight === this.newContainerHeight) { return;