FIX: broken spec

This commit is contained in:
Robin Ward 2015-08-31 15:41:35 -04:00
parent f34f3a0f44
commit a4029675bd

View File

@ -41,7 +41,9 @@ export default Ember.Component.extend({
} else {
$panelBody.height('auto');
const $header = $('header.d-header');
const headerHeight = parseInt($header.height() + $header.offset().top - $(window).scrollTop() + 3);
const headerOffset = $header.offset();
const headerOffsetTop = (headerOffset) ? headerOffset.top : 0;
const headerHeight = parseInt($header.height() + headerOffsetTop - $(window).scrollTop() + 3);
this.$().css({ left: "auto", top: headerHeight + "px" });
$('body').removeClass('drop-down-visible');
}