From 9f14c197f2b052a6f3830742ee2ede2aa8b680a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Mon, 5 Oct 2015 17:04:19 +1100 Subject: [PATCH] less errors in js tests suite --- app/assets/javascripts/discourse/components/menu-panel.js.es6 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/assets/javascripts/discourse/components/menu-panel.js.es6 b/app/assets/javascripts/discourse/components/menu-panel.js.es6 index 7300b309f..5fb1e034a 100644 --- a/app/assets/javascripts/discourse/components/menu-panel.js.es6 +++ b/app/assets/javascripts/discourse/components/menu-panel.js.es6 @@ -133,8 +133,7 @@ export default Ember.Component.extend({ this._resizeInterval = setInterval(() => { Ember.run(() => { const $panelBodyContents = this.$('.panel-body-contents'); - - if ($panelBodyContents.length) { + if ($panelBodyContents && $panelBodyContents.length) { const contentHeight = parseInt($panelBodyContents.height()); if (contentHeight !== this._lastHeight) { this.performLayout(); } this._lastHeight = contentHeight;